← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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