← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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