← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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