← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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