← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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