← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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