← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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