← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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