← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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