← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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