← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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