← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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