← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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