← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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