← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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