← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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