← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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