← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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