← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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