← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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