← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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