← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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