← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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