Adding CSS to your site

The body of this page is the cornsilk color, because it's styled like that in the main.css style sheet which is linked from this web page in its head.

The paragraphs are blue, because of the style instruction in the head of this web page.

Headline here is styled in red directly in its HTML tag

You wouldn't normally mix up the way you style the page like this, but I've done this so you have easy code to see where to insert style instructions.

It's best to use a shared stylesheet (e.g. main.css here) across your pages, and use styling in the page to override where necessary, or where there are lots of style instructions that only apply to one page.

For simplicity, I'm keeping the style instructions in the HTML file in the rest of these example files so you have everything in one place.

This is a demonstration file from Web Design in Easy Steps by Sean McManus.
Back to demo files index.