← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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