← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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