← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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