← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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