← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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