← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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