← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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