← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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