← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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