Assignment: Research and Define CSS Terms

    Specificity

  1. When one or more CSS rules apply to the same element specificity determines which style rule will take effect.

    The selectors are rated on a point system where the id selector is weighted the most and the universal selector is weighted the least.
  2. Precedence

  3. Due to the cascading nature of CSS it means that the browser will render it top to bottom. If there are two competing CSS style rules the browser will apply the one it reads last.

    Precedence is one of the tools of specificity. User defined styles overrides inline CSS while inline CSS overrides embedded CSS while embedded CSS overrides external style sheets and external style sheets overrides the browser default style.
  4. Inheritance

  5. Inheritance means that any CSS effects applied to an element will also apply to the contents of the element, including elements within that element.

    A common use for use for inheritance is applying font to the body element resulting in all of the child elements receiving the same font.
  6. Property

  7. The property is the name of a specific feature such as text-align and color. The property is what you want to do to the element. Properties are ended with a colon (:).
  8. Value

  9. The property value provides a setting for the associated feature. Its the setting that you want to apply to the property. End value with a semi-colon (;).
  10. Selector

  11. The selector identifies the element to which you are applying a style.