views:

61

answers:

2

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>

You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

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

+2  A: 

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>
rahul
+2  A: 

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

Michael Shimmins