← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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