← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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