← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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