← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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