← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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