← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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