← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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