← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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