← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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