← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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