← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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