← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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