← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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