← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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