← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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