← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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