← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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