← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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