← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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