External style sheets can be used to apply a style to several Web pages or even an entire site. To use them, first, you have to make them... but you probably knew that already. Anyway, here's how to make an external style sheet.
1) Create a new file using Notepad or some other text editor. (Yes, there are style sheet editors available, but here, we learn how to do it the hard way.)
2) Set up your document with an opening <STYLE type="text/css"> tag and HTML comment tags.
3) Define your style(s) as explained in the "Global Styles" section.
4) Put in the closing comment and </STYLE> tags.
5) Save your file with the extension ".css". To do this in Notepad, first select "Save As" and then "All Files." Then, add the extension manually and save your file. That's it!
But how do you link to the file? You use a special tag that, interestingly enough, is called the <LINK> tag. The <LINK> tag goes in the head of any HTML document that you would like to apply your external style sheet to. It has no closing tag, and it's set up like this:
<LINK REL="stylesheet" href="example.css" TYPE="text/css">
All you really need to know is that the location of the style sheet you're linking to must be put in quotes following the "href=" attribute. The rest of the tag should be specified exactly as above. You can click here if you'd like to see the <LINK> tag at work. The HTML document which opens up in the new window doesn't contain a style sheet, but has one linked to it instead. Without the style sheet applied, it's just plain, black unmodified text.
Got all that? Great! Now, let's put it to work!