← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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