← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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