← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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