← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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