← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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