← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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