← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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