← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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