← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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