← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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