← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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