HTML onmouseoverEvent Attribute
Example
Run a script when the mouse pointer moves over an image:
<img onmouseover="bigImg(this)" src="smiley.gif.html" alt="Smiley">
Try it Yourself »
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support the onmouseover event attribute.
Definition and Usage
The onmouseover attribute fires when the mouse pointer moves over an element.
Note:The onmouseover attribute cannot be used on the following elements: <base>, <bdo>, <br>, <head>, <html>, <iframe>, <meta>, <param>, <script>, <style>, or <title>.
Differences Between HTML 4.01 and HTML5
None.
Syntax
<element onmouseover="script">
Attribute Value
| Value | Description |
|---|---|
| script | Specifies the script to be executed when the onmouseover event is triggered. |
HTML Event Attributes Other Extensions