← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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