Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

HTML | DOM onmouseenter Event

  • Last Updated : 04 Aug, 2021

The DOM onmouseenter event in HTML occurs when the mouse pointer is moved onto an element. This event is the opposite of onmouseleave event. 
This event is similar to the onmouseover event.
Supported Tags: It supports All HTML elements, EXCEPT: 

  • <base>
  • <bdo>
  •  <br>
  • <head>
  • <html>
  • <iframe>
  • <meta>
  • <param>
  • <script>
  • <style>
  • <title>


Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML  course.

  • In HTML: 
<element onmouseenter="myScript">
  • In JavaScript: 
object.onmouseenter = function(){myScript};
  • In JavaScript, using the addEventListener() method: 
object.addEventListener("mouseenter", myScript);

Example: Using the addEventListener() method 


<!DOCTYPE html>
        HTML DOM onmouseenter Event
        <h1 id="demo">GeeksforGeeks</h1>
          "mouseenter", enter);
        function enter() {
              "demo").style.color = "green";


Supported Browsers: The browsers supported by HTML DOM onmouseenter Event are listed below: 

  • Google Chrome 30.0
  • Internet Explorer 5.5
  • Firefox
  • Apple Safari 6.1
  • Opera 11.5


My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!