← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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