← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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