← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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