← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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