← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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