← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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