← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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