← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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