← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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