← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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