← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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