← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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