← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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