← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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