← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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