← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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