← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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