← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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