Tutorials References Exercises
Log in
Buy Courses

HTML onmouseover Attribute


Definition and Usage

The onmouseover attribute fires when the mouse pointer moves over an element.

Tip: The onmouseover attribute is often used together with the onmouseout attribute.


Applies to

The onmouseover attribute is part of the Event Attributes, and can be used on any HTML elements.

Elements Event
All HTML elements onmouseover

Example

Img Example

Execute a JavaScript when moving the mouse pointer over an image:

<img onmouseover="bigImg(this)" src="smiley.gif" alt="Smiley">
Try it Yourself »

Browser Support

Event Attribute
onmouseover Yes Yes Yes Yes Yes