Kevin W. Tharp

Eagle

Understanding CSS

Cascading Style Sheets, or CSS is the element of web design that lets you control the presentation of the content on the page. The "cascade" of CSS is the ability that it gives the browser to apply rules at different levels and allowing those rules to flow down to subsequent levels. The four levels in the cascade are:

  1. Default
  2. External or Linked
  3. Internal or Embedded
  4. Inline

The rules at the top level of the cascade apply at that level, and all levels below until a rule further down in the cascade overrides that rule. A more specific rule, or one that is encountered by the browser closer to the content it modifies, almost always overrides rules previously encountered by the browser (the exception is the "important" tag that allows a rule to be set as permanent in the current document, but should be used seldom and with care).

 

CSS Cascade Diagram

Understanding Browser Default CSS

  1. Page elements presented using the browser's default presentation attributes
  2. Page elements presented with the default presentations stripped away using a reset stylesheet
  3. Designer Developed Browser Presentation