← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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