← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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