← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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