← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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