← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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