← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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