← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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