← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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