← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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