← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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