← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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