← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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