CSS 2

  • CSS is the acronym for Cascading Style Sheets
  • Your styles define how to display different elements in HTML
  • This was added to HTML 4.0
  • Creating external style sheets simplifies site-wide style updates
  • External style sheets are stored in files ending with .css

Multiple Styles

When HTML was developed, style was not a consideration.  It was more about defining the document content, i.e.:

<h1>Heading</h1>

<p>Paragraph.</p>

In HTML 3.2, tags such as <font> and color attributes were added to the specification. Adding colour and font information to large web sites was a long, tedious process, going page by page and adding tags where needed.

To greatly simplify this process, the World Wide Web Consortium (W3C) created CSS.  In HTML 4.0, all formatting could be removed from the HTML document, and stored in a separate CSS file.

Defining How HTML Elements Are Displayed.

Styles are normally saved in external .css files. External style sheets enable you to change the appearance and layout of all the pages in a Web site, just by editing one single file!  They may also appear in the header section of the .html file, but this is rarely ideal.

  • Facebook
  • Twitter
  • del.icio.us
  • Diigo
  • Faves
  • Mixx
  • Google Bookmarks
  • Yahoo! Bookmarks
  • StumbleUpon
  • Reddit
  • Digg
  • Tumblr