CSS Overview

Rational for using CSS

Cascade Style Sheet (CSS) is designed to remove style from the HTML documents, and store them separately for portability and reusability.

A CSS rule contains at least one selector and at least one declaration within a declaration block.

  • Each selector is separated by a comma (,), and a space used to cascade specificity.
  • A declaration is made up by name/value pair, and each declaration is separated by a semicolon (;)
  • A declaration block is defined by curly braces ({}).

There are three types of style sheets.

  • Browser -- Browser default style sheet for defining non-declared styles.
  • User -- User's style sheet for accessiblity reason.
  • Author -- Designer's style sheet.
Tags: 

Comments

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.