Producing web pages
* HTML CSS DHTML XHTML A to Z of tags        Accessibility          Design

hover

The :hover pseudo-class allows you to create roll over affects. For example:

a:hover {color: red;}

In this example, a link is red if you move the mouse over it.

You can change much more than colour with a:hover. Here are some example styles:

This style…

Looks like this…

a:hover.size {font-size: 18pt}

a:hover.style{font-style: italic}

a:hover.bkgrd{background: #66ff33}

a:hover.face{font-family: "Comic Sans Ms"}

a:hover.combo{color: red; font-weight: bold; background: #ccff66; font-family: “Comic Sans Ms”}

If you have the styles in your style sheet, you can add a link to the page and assign it one of the classes in the table.

<a href="sales.htm" class="face">Sales brochure</a>

The appearance changes as you move the mouse over it.

These examples all apply to the <a> tag but the CSS 2.0 specification says that hover can apply to any tag. I doubt that browsers support this yet.