← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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