← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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