4 ms·
Is it actually valid? W3C's HTML validator complains about invalid nesting. It might work because the HTML5 parsing algorithm produces well-defined results for
by ptx 2y ago
Is it actually valid? W3C's HTML validator complains about invalid nesting.
It might work because the HTML5 parsing algorithm produces well-defined results for broken HTML, but I'm not sure that's the same as "perfectly valid" – the spec calls such markup "misnested" and "erroneous" [0].
[0] https://html.spec.whatwg.org/#an-introduction-to-error-handling-and-strange-cases-in-the-parser https://html.spec.whatwg.org/#an-introduction-to-error-handl...
- btilly 2y agoIt certainly was valid according to the original specs. I first saw it as an example over 20 years ago in a debate about whether XHTML should replace HTML 4.0.