← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

HTML and CSS lesson 14: Colour and text properties · Set 979 · 40 questions
TalentJR

Code tip (Letters, behind, size, place): color = colour of the letters; background-color = colour behind them. font-size = how big (e.g. 20px); font-weight: bold = thick letters; font-family = the font. text-align: left / center / right places the text on its line.

NameDateTime takenScore ___ / 40
  1. 1.🖌️ What colour are the letters?
    h1 {
      text-align: left;
      color: red;
      background-color: white;
      font-size: 32px;
    }
    (a) white (b) green (c) red
  2. 2.🖌️ What colour are the letters?
    li {
      background-color: orange;
      font-size: 32px;
      color: white;
      text-align: center;
    }
    (a) orange (b) green (c) white
  3. 3.🖌️ How big is the text, in px?
    h1 {
      text-align: center;
      font-size: 20px;
      background-color: blue;
      color: orange;
    }
  4. 4.🖌️ Which CSS property sets the letter colour? (a) font-weight (b) font-family (c) color (d) background-color
  5. 5.🖌️ How big is the text, in px?
    li {
      background-color: black;
      text-align: right;
      font-size: 32px;
      color: green;
    }
  6. 6.🖌️ Which CSS property picks the font style? (a) background-color (b) font-weight (c) color (d) font-family
  7. 7.What does color do? (a) makes letters bigger (b) colours behind the text (c) picks the font style (d) sets the letter colour
  8. 8.🖌️ Which CSS property makes the text bold? (a) color (b) font-weight (c) text-align (d) font-family
  9. 9.🖌️ Where does the text sit on its line?
    h2 {
      background-color: blue;
      color: purple;
      font-size: 24px;
      text-align: right;
    }
    (a) in the middle (b) on the right (c) on the left
  10. 10.🖌️ Which CSS property centres a heading? (a) color (b) text-align (c) background-color (d) font-weight
  11. 11.🖌️ Where does the text sit on its line?
    p {
      text-align: center;
      font-size: 32px;
      background-color: orange;
      color: white;
    }
    (a) on the left (b) on the right (c) in the middle
  12. 12.What does font-weight do? (a) sets the letter colour (b) makes the text bold (c) colours behind the text (d) centres a heading
  13. 13.🖌️ Where does the text sit on its line?
    li {
      font-size: 12px;
      text-align: right;
      color: blue;
      background-color: black;
    }
    (a) on the left (b) in the middle (c) on the right
  14. 14.🖌️ Where does the text sit on its line?
    h2 {
      background-color: red;
      text-align: left;
      font-size: 24px;
      color: white;
    }
    (a) in the middle (b) on the left (c) on the right
  15. 15.🖌️ What colour is behind the letters?
    h2 {
      text-align: left;
      color: orange;
      background-color: red;
      font-size: 20px;
    }
    (a) yellow (b) red (c) orange
  16. 16.🖌️ What colour are the letters?
    h2 {
      font-size: 20px;
      background-color: white;
      color: yellow;
      text-align: left;
    }
    (a) white (b) blue (c) yellow
  17. 17.🖌️ How big is the text, in px?
    h1 {
      color: red;
      font-size: 32px;
      background-color: blue;
      text-align: right;
    }
  18. 18.🖌️ What colour is behind the letters?
    p {
      text-align: right;
      background-color: white;
      font-size: 32px;
      color: yellow;
    }
    (a) yellow (b) white (c) orange
  19. 19.What does font-size do? (a) sets the letter colour (b) makes letters bigger (c) centres a heading (d) picks the font style
  20. 20.🖌️ What colour are the letters?
    h2 {
      text-align: left;
      font-size: 16px;
      color: orange;
      background-color: red;
    }
    (a) white (b) orange (c) red
  21. 21.🖌️ What colour is behind the letters?
    h1 {
      color: blue;
      font-size: 24px;
      background-color: yellow;
      text-align: center;
    }
    (a) blue (b) yellow (c) orange
  22. 22.🖌️ What colour is behind the letters?
    p {
      text-align: left;
      font-size: 20px;
      color: yellow;
      background-color: blue;
    }
    (a) green (b) yellow (c) blue
  23. 23.What does font-family do? (a) picks the font style (b) sets the letter colour (c) centres a heading (d) makes letters bigger
  24. 24.🖌️ What colour are the letters?
    h2 {
      background-color: red;
      color: yellow;
      text-align: right;
      font-size: 16px;
    }
    (a) yellow (b) red (c) black
  25. 25.🖌️ Which CSS property colours behind the text? (a) background-color (b) font-family (c) font-weight (d) text-align
  26. 26.🖌️ Where does the text sit on its line?
    li {
      text-align: center;
      background-color: purple;
      font-size: 16px;
      color: orange;
    }
    (a) on the left (b) on the right (c) in the middle
  27. 27.🖌️ How big is the text, in px?
    p {
      background-color: yellow;
      font-size: 28px;
      text-align: right;
      color: green;
    }
  28. 28.🖌️ Where does the text sit on its line?
    h1 {
      background-color: green;
      font-size: 20px;
      text-align: left;
      color: red;
    }
    (a) in the middle (b) on the left (c) on the right
  29. 29.🖌️ What colour are the letters?
    h2 {
      font-size: 32px;
      text-align: left;
      background-color: red;
      color: green;
    }
    (a) yellow (b) green (c) red
  30. 30.🖌️ How big is the text, in px?
    h1 {
      color: purple;
      font-size: 40px;
      text-align: right;
      background-color: orange;
    }
  31. 31.🖌️ Where does the text sit on its line?
    li {
      background-color: purple;
      text-align: left;
      font-size: 20px;
      color: yellow;
    }
    (a) on the right (b) on the left (c) in the middle
  32. 32.What does text-align do? (a) colours behind the text (b) picks the font style (c) centres a heading (d) sets the letter colour
  33. 33.🖌️ What colour is behind the letters?
    p {
      font-size: 32px;
      text-align: center;
      color: white;
      background-color: orange;
    }
    (a) blue (b) white (c) orange
  34. 34.🖌️ How big is the text, in px?
    h1 {
      color: blue;
      background-color: black;
      font-size: 24px;
      text-align: right;
    }
  35. 35.🖌️ Which CSS property makes letters bigger? (a) background-color (b) font-family (c) font-weight (d) font-size
  36. 36.🖌️ Where does the text sit on its line?
    p {
      background-color: white;
      font-size: 20px;
      text-align: left;
      color: orange;
    }
    (a) on the right (b) in the middle (c) on the left
  37. 37.🖌️ What colour is behind the letters?
    h2 {
      text-align: center;
      color: red;
      background-color: orange;
      font-size: 20px;
    }
    (a) red (b) blue (c) orange
  38. 38.🖌️ What colour are the letters?
    p {
      text-align: center;
      background-color: blue;
      color: white;
      font-size: 12px;
    }
    (a) blue (b) white (c) green
  39. 39.🖌️ How big is the text, in px?
    p {
      text-align: right;
      font-size: 36px;
      background-color: yellow;
      color: blue;
    }
  40. 40.🖌️ How big is the text, in px?
    h1 {
      text-align: right;
      color: black;
      font-size: 24px;
      background-color: yellow;
    }

Answer key

  1. red
  2. white
  3. 20
  4. color
  5. 32
  6. font-family
  7. sets the letter colour
  8. font-weight
  9. on the right
  10. text-align
  11. in the middle
  12. makes the text bold
  13. on the right
  14. on the left
  15. red
  16. yellow
  17. 32
  18. white
  19. makes letters bigger
  20. orange
  21. yellow
  22. blue
  23. picks the font style
  24. yellow
  25. background-color
  26. in the middle
  27. 28
  28. on the left
  29. green
  30. 40
  31. on the left
  32. centres a heading
  33. orange
  34. 24
  35. font-size
  36. on the left
  37. orange
  38. white
  39. 36
  40. 24

Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids