3 ms·
FYI in traditional SGML DTD-driven HTML parsing, "disabled" in <div disabled> represents the attribute value rather than the attribute name. The value has
by tannhaeuser 3y ago
FYI in traditional SGML DTD-driven HTML parsing, "disabled" in
<div disabled>
represents the attribute value rather than the attribute name. The value has to be declared in an enumeration and must be different from all other enumerated values (of other elements) for the parser to infer the attribute and emit canonical markup such as
<div disabled="disabled">
In HTML, it just so happens that the attribute name in what the WHATWG HTML spec calls a "Boolean attribute" is always the same as the single allowed value. However, WHATWG managed to break that in the latest spec, allowing "until-found" as additional value for the "hidden" attribute [1].
[1]: https://sgmljs.net/docs/html230116.html https://sgmljs.net/docs/html230116.html