Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<blockquote> <p>Will web browsers render the webpage anyway, no matter what errors are there in the HTML?</p> </blockquote> <p>In the HTML serialization, modern browsers follow a parsing algorithm designed to be tolerant of mark up errors, and will render whatever it makes of the complete input stream.</p> <p>In the XHTML serialisation, the parsing must follow XML parsing rules. This means that if and when it encounters a well-formedness error, it <strong>must</strong> stop parsing the input stream. The browser is <strong>not</strong> required to report an error (Firefox does, IE9 doesn't), and may choose to simply render whatever DOM it has built at the point where it had to stop parsing, and remain HTML5 conforming.</p> <blockquote> <p>In which situations, the web browsers will complain the errors in the HTML?</p> </blockquote> <p>Browsers do not, in practice, report errors, except for XML well-formedness errors when using the XHTML serialization, and then only sometimes. If they did, then they are telling the user, who is not the least bit interested in whether the author made a mistake when the page was written. All the user wants is access to the content.</p> <blockquote> <p>Further, Is this no-error-reporting required by HTML5 specification?</p> </blockquote> <p>No it isn't. Browsers are entitled if they so wished to report such errors. The HTML serialization parsing algorithm is quite clear about when a error occurs. In the case of your mark up, the relevant rule says:</p> <blockquote> <p><strong>An end tag whose tag name is one of: "address", "article", "aside", "blockquote", "button", "center", "details", "dialog", "dir", "div", "dl", "fieldset", "figcaption", "figure", "footer", "header", "hgroup", "listing", "menu", "nav", "ol", "pre", "section", "summary", "ul"</strong></p> <p>If the stack of open elements does not have an element in scope with the same tag name as that of the token, then <strong>this is a parse error</strong>; ignore the token.</p> <p>...</p> </blockquote> <p>Then the rules for handling parse errors does not require browsers to either report them or not report them. Validators are required to report at least one such parse error,</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload