← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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