← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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