← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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