Cascading Style Sheets

Introduction
Cascading Style Sheets (CSS) is a style sheet language used to format markup such as HTML. While HTML defines the page, CSS tells the browser how it should be displayed. For example the HTML tags   Text    tells the browser, "This is a paragraph". But with CSS, you could decide the background color, height, width, font etc. of the paragraph.

Why Use CSS
CSS is normally used as an external file. That way, all HTML files on your website can then link to, and use the file. A CSS file, has the extension ".css" e.g. "style.css". Using CSS saves you time and effort, when redesigning your website. Rather than having to individually edit each page on you website, you can just edit the CSS file and it will affect all pages that have linked to it. CSS however does not affect the content on each page, it only affects how to display it. CSS can also be used in individual pages, but then all changes made, will only affect that page.

CSS Basics
CSS is actually quite easy to learn. Here is a basic example of a CSS file.

CSS FILE body { color:       black; font-family: Arial; font-size:   12pt; } p { color:       black; float:       right; width:       300px; border:      1px solid blue; } a { text-decoration: none; color:       blue; } a :hover { color:       red; }

To link to an external CSS file, you would put the following into the header of your HTML page.

LINKING TO AN EXTERNAL STYLESHEET 

You can link to the same CSS file from any page on your website, using "/" to search through different directories.