CSS Terms

Use your current knowledge, the Internet and additional references to research the following CSS related terms. For each of the following terms provide two or more paragraphs. Discuss their definition, their role in CSS and how they work.

  1. Specificity
  2. If you have two (or more) conflicting CSS rules that point to the same element, there are some basic rules that a browser follows to determine which one is most specific and therefore wins out. More Specific = Greater Precedence

  3. Precedence
  4. When the browser needs to resolve what styles to apply to a given HTML element, it uses a set of CSS precedence rules. Given these rules, the browser can determine what styles to apply. The rules are:

  5. Inheritance
  6. Inheritance is a mechanism that's separate from the cascade: inheritance applies to the DOM (Document Object Model) tree, while the cascade deals with the style sheet rules. However, CSS properties set on an element via the cascade can be inherited by that element's child elements.

  7. Property
  8. Value
  9. A value is given to a css selector such as px, em, color or even url(for background image).

  10. Selector
  11. selector is used to select elements with the specified attribute and value.