"Firas D." <fd********@firasd.org> wrote:
Karl Smith wrote:
That's a long standing Mozilla bug, failing to recognize the </body>
tag, and IE is simply ignoring the ruleset completely because it
doesn't implement child selectors.
A proper implementation of </body> would refuse to display anything
following the closing tag?
No, I think the OP's expectation was correct. His P after BODY should
be displayed, but it certainly shouldn't match a selector like "body >
p".
Why browsers continue to format after an </html> tag is easier to
understand, that's an obvious error. An XML parser will halt with some
message along the lines of, "Junk after document - only whitespace
allowed," and an error correcting HTML parser infers the location of
</html> at the very end of the doc as soon as it passes <html>,
ignoring any "extra" </html>.
But it shouldn't error-correct by ignoring the closing </body> tag
where the author wrote it, and automatically inserting one where
Mozilla thinks it usually goes. If the doc is tag soup and the browser
has to interpolate extra elements to compensate, fair enough. But if
the doc is a proper tree of elements, the "error correction" is just
plain interference.
The earliest HTML documents had the structure: title, body, address.
Address got moved to inside body later on. I wonder what Mozilla would
make of one of those fossils if one could be found?
--
Karl Smith.