← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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