← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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