← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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