← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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