← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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