← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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