← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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