← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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