← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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