← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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