← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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