← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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