← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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