Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Onmouseenter validation error

When I tried to validate this code in https://validator.w3.org/

<!doctype html>
<html>
<head><title>onmouseenter validation</title>
</head>
<body>        
<div onmouseenter="javascript:alert('hello');">Event Validation</div>
</body>
</html>

The following error appears

"Attribute onmouseenter not allowed on element div at this point."

Somebody know why the validator keeps telling is an error?

I believe that onmouseenter is a valid attribute for a html element.

like image 762
Observador Avatar asked Sep 28 '22 18:09

Observador


1 Answers

Your code is perfectly valid. The spec clearly states that onmouseenter is a valid event handler on all HTML elements in HTML5. There is no change in the HTML 5.1 spec at the present time.

Substituting onmouseover produces no errors in the validator, leading me to believe this is merely a bug on their end. This bug does not appear to have been reported, so I would recommend filing one.

like image 193
Mooseman Avatar answered Oct 02 '22 14:10

Mooseman