← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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