← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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