← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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