← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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