← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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