← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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