← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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