Take the 2-minute tour ×

I developed a web page and now i am validating it with w3c HTML4.0... I got one error it says

Error Line 30, Column 57: there is no attribute "DATA-FLEXMENU"

href="about.php" class="mainlink" data-flexmenu="flexmenu1">About Us</a></div>


Any ways of getting rid of this error .... Any suggestion...

share|improve this question
If it is HTML4.0 compliant then it's HTML5.0 compliant, try using the HTML5.0 scheme. –  Ben Apr 8 '10 at 5:00
@omfgroflmao ya i am using HTML4.0 –  Oscar Apr 8 '10 at 5:01
As rahul said, "data attributes are present in HTML5", change the doctype and try to revalidate. –  Ben Apr 8 '10 at 5:04
add comment

2 Answers

up vote 3 down vote accepted

data attributes are present in HTML5.

see HTML 5 data- Attributes

Either you can change the doctype to html5 or remove the data attribute.

You can specify HTML 5 doctype like

<!DOCTYPE html>
share|improve this answer
add comment

As unhelpful as it will sound, either remove the attribute "data-flexmenu" from your markup, or accept a non-valid result.

The results are accurate, the A element in the DTD does not contain an attribute definition for the attribute data-flexmenu.

Alternatively you could define your own DTD and host it on a central server and reference that instead of the w3c one.

Or (as pointed out) use HTML5 DTD not HTML 4 DTD

share|improve this answer
add comment

Your Answer


