← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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