← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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