← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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