← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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