← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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