← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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