← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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