← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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