← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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