← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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