← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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