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.