← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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