← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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