← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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