HTML | onmouseover Event Attribute
The onmouseover event attribute works when the mouse pointer moves over the specified element.
Syntax:
<element onmouseover = "script">
Attribute value: This attribute contains single value script which works when mouse moves over the element.
Supported Tags: This attribute is supported by almost all HTML elements except <base>, <bdo>, <br>, <head>, <html>, <iframe>, <meta>, <param>, <script>, <style>, and <title>.
Example:
<!DOCTYPE html> <html> <head> <title>onmouseover Event Attribute</title> <style> body { text-align:center; } h1 { color:green; } </style> <script type="text/javascript" > function geeks() { alert("Mouse move over"); } </script> </head> <body> <h1>GeeksforGeeks</h1> <h2>onmouseover Event Attribute</h2> <p onmouseover ="geeks()">Computer science portal</p> </body> </html> |
Output:

Supported Browser: The browser supported by onmouseover Event Attribute are listed below:
- Google Chrome
- Internet Explorer
- Safari
- Firefox
- Opera
Recommended Posts:
- HTML | DOM onmouseover event
- HTML | onerror Event Attribute
- HTML | onhashchange Event Attribute
- HTML | ononline Event Attribute
- HTML | ondragleave Event Attribute
- HTML | onselect Event Attribute
- HTML | onmouseout Event Attribute
- HTML | onclick Event Attribute
- HTML | onafterprint Event Attribute
- HTML | onbeforeprint Event Attribute
- HTML | onbeforeunload Event Attribute
- HTML | onkeydown Event Attribute
- HTML | onresize Event Attribute
- HTML | ondrag Event Attribute
- HTML | onpageshow Event Attribute
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.



