← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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