← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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