← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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