← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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