← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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