← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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