Adam Pietrasiak
Adam Pietrasiak

Reputation: 13184

HTML - tag name as attribute - is valid and how to use?

Is such html markup valid?

<icon="pen"/>

And if so, how to manage it like via jQuery?

Upvotes: 0

Views: 37

Answers (1)

Quentin
Quentin

Reputation: 943185

No, it is not valid. Don't do that.

There is a proposal for a custom elements spec, which could make icon allowable.

But following the element name with an = character is simply wrong.

Upvotes: 1

Related Questions