← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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