← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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