← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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