← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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