← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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