Error messages for corrupt HTML

Vlad Alexander asks Should error messages be displayed for corrupt HTML5?. Sure, why not.

Many people who do not like the idea of browsers displaying error messages for corrupt/invalid HTML tend to equate error messages with the “Yellow screen of death” that Firefox and other Gecko-based browsers display when they encounter a non well-formed XHTML document served as application/xhtml+xml.

This is often referred to as “draconian error handling” and is indeed quite harsh. But it is not the only possible way of notifying the user that something is wrong with the document they are viewing. Error notification can be a lot more discreet, like the smiley that iCab displays in the status bar. It’s sad if there are errors in the document’s HTML or CSS, happy if there are none. Click the sad smiley and you get a list of the errors. Completely unobtrusive in my opinion. Safari for the iPhone and iPod Touch has a somewhat similar feature in the Debug Console (which is hidden by default).

If you feel strongly either way about error messages for broken HTML, you may want to read An open invitation to the HTML5 team, where Vlad invites Ian Hickson, editor of the HTML 5 specification, to debate on this topic.

Posted on January 11, 2010 in Browsers, HTML 5, Web Standards

Comments are disabled for this post (read why), but if you have spotted an error or have additional info that you think should be in this post, feel free to contact me.