← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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