← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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