← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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