← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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