← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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