← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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