[英]HTML - tag name as attribute - is valid and how to use?
Is such html
markup valid? 这样的
html
标记有效吗?
<icon="pen"/>
And if so, how to manage it like via jQuery
? 如果是这样,如何通过
jQuery
进行管理?
No, it is not valid. 不,这是无效的。 Don't do that.
不要那样做
There is a proposal for a custom elements spec, which could make icon
allowable. 有一个关于 自定义元素规范的建议 ,该规范可以使
icon
允许。
But following the element name with an =
character is simply wrong. 但是在元素名称后加上
=
字符完全是错误的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.