← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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