← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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