← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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