← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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