← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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