← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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