开发者

jQuery “data” attribute doesn't W3C validate

开发者 https://www.devze.com 2023-03-01 05:55 出处:网络
I\'m wondering why this bit of html doesn\'t validate (XHTML 1.0 transitional) because of the \"data\" attribute. I\'ve searched around for answers, and I\'m not using the jQuery metadata plugin, if t

I'm wondering why this bit of html doesn't validate (XHTML 1.0 transitional) because of the "data" attribute. I've searched around for answers, and I'm not using the jQuery metadata plugin, if that matters.

Any way to get this to validate, or escape it so the validator doesn't see it?

<div id="ho开发者_如何学JAVAme" data-image="images/water.jpg">


Because data attributes are part of the HTML 5 spec. Use <!DOCTYPE html> to specify the HTML 5 doctype.

0

精彩评论

暂无评论...
验证码 换一张
取 消