← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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