← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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