← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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