← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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