← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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