← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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