← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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