Skip to content Skip to sidebar Skip to footer

Htmlspanelement Vs. Htmlunknownelement

References: https://developer.mozilla.org/en-US/docs/Web/API/HTMLSpanElement https://developer.mozilla.org/en-US/docs/Web/API/HTMLUnknownElement Is there any real difference betw

Solution 1:

According to both the HTML 5 spec and the HTML 4.0.1 spec, the only conveyed meaning by span is display:inline;- which is the default behavior of all elements before which element is considered.

The only difference that SHOULD exist between an HTMLSpanElement and an HTMLUnknownElement is that the former is tied to a span and the latter is not.

Note that only Global Attributes and Events will have built-in interfaces from HTMLUnknownElement, and that span also only has the global attributes/events defined for it (see the spec links at the top).


What this means depends on what you want to do.

If you're wanting to go from cstm-elem to span, you are likely safe, as the spec pretty clearly states that span is just a generic inline (with div being a generic block).

If you're wanting to go from span to cstm-elem, IE8 has historically been terrible for that, and replacing the latter with the former is the general solution suggested to this problem.

Good news, though, IE 8 has been EOL since mid January, 2016. Was quite a party we threw, shame you couldn't be there.

Post a Comment for "Htmlspanelement Vs. Htmlunknownelement"