← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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