← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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