← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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