← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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