← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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