← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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