← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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