← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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