Introduction to Rollovers

Rollovers require an event handler

You need to have an event handler to create a rollover. That means that there has to be some element to hang your event handler on.

The <span> element is often used for this purpose if we need to create an element in the middle of a paragraph (or other block element).

A <div> element can be used for an entire section of a web page (a "division") that includes multiple block elements.

More complex rollovers

The rollovers on this page are simple ones---only the color or background color of some text changes. More complex rollovers can be done with images. We'll explore those later on.