Her

Home HTML and CSS Tutorials Advanced CSS (linking to an external style sheet)

Advanced CSS (linking to an external style sheet)

Author: Adam Priestley Author's URL: www.switchdesigns.net More by this author

The advanced way, and the easiest way to do CSS is to link to an external style sheet. Here I will sow you how. If you are new to CSS, I reccommend reading the basic CSS tutorial first, if you haven't already.

First, open up notepad and put all your styles in. One of the great things about external style sheets is that you don't have to put in the <style> tags, just the code that normally goes in between them.

Advanced CSS (linking to an external style sheet)

Put all the code in that you want, but it might be best to just start with something like this:

body{font-color:#CCCCCC}

Got that? Go to file-->save as and save the file as style.css It must have the .css extension, otherwise it won't work.

Open up the file that you wish to apply the style to, and put this into the <head> </head> tags of the page:

<link rel="stylesheet" href="style.css">

If you gave your .css file a different name, you will have to change it in the code above.

That is all there is to it!