← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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