← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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