← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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