Cascading Style Sheets

With a well-designed web site, we want to ensure we are using (X)HTML to indicate the structure of the document only. If we want content delineated by certain tags to look a certain, non-default way, we can modify the default appearance of tagged content by assigning new attributes to a tag in a style sheet.

Styles can be applied to a web page either using an internal style modifier or an external stylesheet. Both methods have advantages and disadvantages, though as a rule you want to use external stylesheets whenever possible. Their use saves bandwidth, loading/processing time, and storage space. Creating a stylesheet is easy — create a plain ASCII text file containing the desired style information, and save with the file extension .css.

Cascading Style Sheets, properly used to their full effect, get a little complex, so we are breaking their information down into several parts. If you didn’t go through the CSS tutorials at HTMLDog while you were working on HTML (I know a lot of you did), go back first and do so.

  1. Part I (this document) — Principles and Concepts Underlying CSS
  2. Part II — Using CSS for Styling Your HTML
  3. Part III — Position and Layout with CSS
  4. Part IV — Handling Browser Idiosyncracies

Readings on Cascading Style Sheet Principles

On to Part 2 — Styling Your HTML