Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why w3 validator says onClick is not valid?

w3 validator gives me this error

there is no attribute "onClick"

I can't see what is making my code invalid.

<a href="#" onClick="return BookmarkApp.addBookmark(this)"><img alt="" src="./favorites-intro.jpg" /></a>

suggestions?

like image 262
Lucas Matos Avatar asked Mar 08 '12 20:03

Lucas Matos


People also ask

What is W3C validation error?

W3C validation is the process of checking a website's code to determine if it follows the formatting standards. If you fail to validate your website's pages based on W3C standards, your website will most likely suffer from errors or poor traffic owing to poor formatting and readability.

What does W3C validator do?

The Markup Validator is a free service by W3C that helps check the validity of Web documents. Most Web documents are written using markup languages, such as HTML or XHTML . These languages are defined by technical specifications, which usually include a machine-readable formal grammar (and vocabulary).


1 Answers

If you change it to lower case onclick, the error goes away. Like this:

<a href="#" onclick="return BookmarkApp.addBookmark(this)"><img alt="" src="./favorites-intro.jpg" /></a>
like image 139
Waynn Lue Avatar answered Sep 30 '22 14:09

Waynn Lue