Comment by chrismorgan
Comment by chrismorgan 2 days ago
For reference, observe what happens if you try opening this malformed document in a browser: save it with a .xhtml extension, or serve it with MIME type application/xhtml+xml.
Firefox displays naught but the error:
XML Parsing Error: mismatched tag. Expected: </b>.
Location: file:///tmp/x.xhtml
Line Number 22, Column 3:
</p>
--^
Chromium displays this banner on top of the document up to the error: This page contains the following errors:
error on line 22 at column 5: Opening and ending tag mismatch: b line 19 and p
Below is a rendering of the page up to the first error.
Thanks for showing these. We can see Firefox matches the same style of accurate but unhelpful error message.
Chromium is much more helpful in the error message, directing the user to both line 19 and 22. It also made the user-friendly choice to render up to the error.
In the context of XHTML, we should also keep in mind that Chrome post-dates XHTML by almost a decade.