← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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