← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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