← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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