← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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