← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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