← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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