← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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