← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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