Beginning CSS

The hardest thing about using CSS is getting all of the files involved synchronized with each other. There are two ingredients: a web page that refers to the CSS page, and the CSS page that gives the formatting. Thus, in starting to create the style sheet, the first thing you must do is to get the HTML page pointed at the CSS page. Below, we show an unformatted HTML page, from the associated ICE. You should save it to your local disk.

Next, open a blank page in a generic editor, for your CSS file.

Type in a few CSS specifications, and then save the file.

Point your browser at the HTML file you saved, and open it in the HTML editor.

Look at the HTML source using the tab at the bottom of the editor. Find the tag, near the top of the file.

The way the link is set up now, it says to look for the CSS file in a subdirectory of the one containing the HTML. We have probably saved our style sheet in the same directory as the HTML.

We must change the HTML so that it points at a style sheet in the same directory as the HTML page.

Voila'! The style specifications we make in our CSS sheet now apply to our HTML.

Subsequent changes all continue to apply - we are done with the hard part.