← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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