← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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