← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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