← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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