← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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