← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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