← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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