← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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