← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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