← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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