← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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