← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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