← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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