← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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