← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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