← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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