← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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