← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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