← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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