← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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