← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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