← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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