← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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