← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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