CSS Introduction

Prerequisite Knowledge

Before you proceed, you need to have a basic understanding of the following:

  • HTML / XHTML

If you wish to start learning about these topics first, please visit the relevant tutorials on the homepage.

What is CSS?

  • CSS stands for Cascading Style Sheets.
  • Styles define how HTML elements are displayed.
  • Styles are typically stored in style sheets.
  • Adding styles to HTML 4.0 was intended to address the separation of content and presentation.
  • External style sheets can greatly enhance efficiency.
  • External style sheets are usually stored in CSS files.
  • Multiple style definitions can cascade into one.

CSS Examples

An HTML document can exhibit different styles: See how CSS works.

Styles Solve a Significant Problem

HTML tags were initially designed to define document content, as shown in the following example:

<h1>This is a heading</h1>
<p>This is a paragraph.</p>


Style sheets define how HTML elements are displayed, much like the role played by font tags and color attributes in HTML. Styles are often saved in external .css files. By editing a simple CSS document, you can alter the layout and appearance of all pages.