← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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