← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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