← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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