← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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