← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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