← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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