← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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