← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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