← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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