← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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