← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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