← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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