This XHTML document contains well-formedness errors. Because the user agent only performs automatic well-formedness checking when it treats the document as XML, the error goes unnoticed when the document is sent as text/html. Automatically failing on errors is a very helpful way to ensure that all webpages are written properly and forces web developers to take greater care that they are writing parsable code.