← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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