← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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