← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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