Is the “data” attribute a standard attribute of the XHTML Strict Doctype?

跟風遠走 提交于 2019-12-25 00:52:17

问题


Like the title says, I'm trying to determine if data is a standard attribute in the XHTML strict doctype. I can't seem to find any information online (looks like its HTML-5ish).


回答1:


If you're talking about attributes with the data- prefix, that's indeed HTML5 only. If you want to use them in XHTML, you'd need XHTML5.

There is also an attribute whose name is just data. It's for <object> elements and works like the src attribute on images. It's part of HTML4 and XHTML1 in both Strict and Transitional doctypes.



来源:https://stackoverflow.com/questions/2449662/is-the-data-attribute-a-standard-attribute-of-the-xhtml-strict-doctype

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!