← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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