← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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