← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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