← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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