← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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