← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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