← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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