← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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