Open In App
Related Articles

HTML onmouseover Event Attribute

Improve Article
Save Article
Like Article

The onmouseover event attribute works when the mouse pointer moves over the specified element. 


<element onmouseover = "script">

Attribute value: This attribute contains a single value script that works when the mouse moves over the element. 

Example: In this example, we will see when we hover our mouse over an element we can see an alert popup on our screen.


    body {
        text-align: center;
    h1 {
        color: green;
<script type="text/javascript">
    function geeks() {
        alert("Mouse move over");
<h2>onmouseover Event Attribute</h2>
<p onmouseover="geeks()">Computer science portal</p>



We have a complete list of HTML DOM methods, to check those please go through this HTML DOM Object Complete reference article.

Supported Tags: This attribute is supported by almost all HTML elements except <base>, <bdo>, <br>, <head>, <html>, <iframe>, <meta>, <param>, <script>, <style>, and <title>.

Supported Browser: The browser supported by onmouseover Event Attribute are listed below:

  • Google Chrome 2
  • Edge 12
  • Internet Explorer 9
  • Safari 4
  • Firefox 6
  • Opera 9.5

We have a Cheat Sheet on Javascript where we covered all the important topics of Javascript to check those please go through Javascript Cheat Sheet-A Basic guide to JavaScript.

Last Updated : 02 Dec, 2022
Like Article
Save Article
Similar Reads
Related Tutorials