← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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