← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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