← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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