:hover and :active

a:hover works in all browsers except for Netscape 4 and iCab.

a:active doesn't work in Konqueror and Opera 5 on Mac and is buggy in Explorer on Windows.

On other elements both pseudo-classes work in Opera 7, Safari and Mozilla.

Originally invented by Microsoft, the a:hover pseudoclass was an immediate hit. It allows you to define the styles of a link the mouse hovers over. a:active means: a link that the user clicks on.

Test link for a:hover and a:active.

Since this invention the :hover and :active pseudo-classes have been ported to all other elements.

This is a p class="test". It should become bold on hover. However, it doesn't in Mozilla 1.6 because I left the p out of the hover selector AND this page is in Quirks Mode. Mozilla 1.6 only supports .test:hover in Strict Mode.
Hurray, hurray.

Testsheet:

p:hover {font-style: italic;}
p:active {text-decoration: underline;}

a:hover {text-decoration: overline;}
a:active {font-weight: 600;}

.test:hover {font-weight: 600}