← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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