← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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