11 Vote

HTML Validator Error "There is no Attribute XYZ"

Question by Guest | 2014-05-31 at 17:21

Today, I have tried to validate my website using an HTML Validator. I am alarmed to have found that all of my custom attributes are displayed as errors.

For example, I am using custom attributes such as vid="1" on many elements to be able to pass values via JavaScrit to my PHP scripts.

I cannot image any way to implement such things without using my own attributes.

ReplyPositiveNegative
1Best Answer1 Vote

If you are not yet using HTML 5, you can shift your website to HTML5 to solve this issue, for example.

HTML 5 allows self defined attributes starting with "data-" followed by at least one character. Using this, your site should be validatable. In HTML 4, custom attributes are not allowed.

I have answered your question under defining custom attributes for HTML text and validation in more detail.
2014-05-31 at 17:31

ReplyPositive Negative
Reply

Related Topics

Important Note

Please note: The contributions published on askingbox.com are contributions of users and should not substitute professional advice. They are not verified by independents and do not necessarily reflect the opinion of askingbox.com. Learn more.

Participate

Ask your own question or write your own article on askingbox.com. That’s how it’s done.