← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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