← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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