← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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