← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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