← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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