← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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