|| Web Start Help ||

HTML Final Lessons.

Time to learn about style sheets, commonly known as CSS.

You have already seen inline style attributes, like so:


You can actually add a style attribute to any tag, not just <span> and <div>.



A style sheet defines what certain elements on your page should look like. This spares you the extra time of coding each element to be a certain color or size, much like the body attribute declarations. This also saves much time when you want to make global changes to the way your page looks.

Internal style sheets can be included in between your head tags.



When written this way, the style attributes affect all the elements on your page. Inline attributes will override internal attributes.


Style sheets can also be external files which you include. This saves you having to code each page, and makes updates faster and easier.



In this example, your separate style sheet will be named mysite.css and located in the css directory.

Here is what it looks like:

Notice that CSS gives you the ability to style your elements differently for different states. The "visited" links you are familiar with, but now we can also easily control the way links look when we "hover over" them.

When used this way, the style attributes affect all the elements on your page. Inline and internal attributes will override external attributes.


When you are ready to do more with CSS, it's easier to google search for new style attributes, rather than trying to memorize all of them.

Continue Learning