← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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