← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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