← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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