← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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