← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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