A parse error marks markup that breaks the rules, but it never stops a browser: each has a defined recovery. The tokenizer’s errors have the names below, from the standard’s table; tree construction’s errors have no names and are described case by case in the algorithm (for example, a tag in the wrong place, an element not closed, or a stray end tag).
The 52 named errors
| Name | What it means, and the recovery |
|---|---|
abrupt-closing-of-empty-comment | A comment closed straight after its start, as <!--> or <!--->; the comment is empty |
abrupt-doctype-public-identifier | A > inside the public identifier; quirks mode |
abrupt-doctype-system-identifier | A > inside the system identifier; quirks mode |
absence-of-digits-in-numeric-character-reference | &# or &#x with no digits; left as text |
cdata-in-html-content | A CDATA section outside SVG and MathML; read as a comment up to the first > |
character-reference-outside-unicode-range | A numeric reference above U+10FFFF; reads as U+FFFD |
control-character-in-input-stream | A C0 or C1 control character in the file other than white space |
control-character-reference | A numeric reference to a control character; C1 values are remapped as Windows-1252 |
disallowed-processing-instruction-target | A processing instruction named xml or xml-stylesheet; read as a comment |
duplicate-attribute | An attribute repeated on a tag; the later ones are ignored |
end-tag-with-attributes | Attributes on an end tag; dropped |
end-tag-with-trailing-solidus | </x/>; the / is ignored |
eof-before-tag-name | The file ends after <; that character is text |
eof-in-cdata | The file ends inside a CDATA section |
eof-in-comment | The file ends inside a comment |
eof-in-doctype | The file ends inside a DOCTYPE; quirks mode |
eof-in-processing-instruction | The file ends inside a processing instruction |
eof-in-script-html-comment-like-text | The file ends inside <!-- in a script |
eof-in-tag | The file ends inside a tag; the tag is dropped |
incorrectly-closed-comment | A comment closed with --!>; it is still a comment |
incorrectly-opened-comment | <! not followed by --, DOCTYPE or CDATA; read as a comment |
invalid-character-sequence-after-doctype-name | Text after the name other than PUBLIC or SYSTEM; quirks mode |
invalid-first-character-of-processing-instruction-target | A processing instruction whose name starts wrongly; read as a comment |
invalid-first-character-of-tag-name | < or </ followed by an invalid character; the < is text (a comment for </) |
invalid-processing-instruction-target | An invalid character in a processing instruction’s name; read as a comment |
missing-attribute-value | a= with no value before >; the value is empty |
missing-doctype-name | <!DOCTYPE>; quirks mode |
missing-doctype-public-identifier | PUBLIC with nothing after it; quirks mode |
missing-doctype-system-identifier | SYSTEM with nothing after it; quirks mode |
missing-end-tag-name | </>; dropped |
missing-quote-before-doctype-public-identifier | No opening quote; quirks mode |
missing-quote-before-doctype-system-identifier | No opening quote; quirks mode |
missing-semicolon-after-character-reference | A reference without its ;; still decoded |
missing-whitespace-after-doctype-public-keyword | No space after PUBLIC |
missing-whitespace-after-doctype-system-keyword | No space after SYSTEM |
missing-whitespace-before-doctype-name | No space after <!DOCTYPE |
missing-whitespace-between-attributes | No space between attributes |
missing-whitespace-between-doctype-public-and-system-identifiers | No space between the identifiers |
nested-comment | <!-- inside a comment |
noncharacter-character-reference | A reference to a Unicode noncharacter |
noncharacter-in-input-stream | A noncharacter in the file |
non-void-html-element-start-tag-with-trailing-solidus | <div/> on an element that is not void; the / is ignored and the element stays open |
null-character-reference | �; reads as U+FFFD |
surrogate-character-reference | A reference to a surrogate; reads as U+FFFD |
surrogate-in-input-stream | A lone surrogate in the file |
unexpected-character-after-doctype-system-identifier | Text after the system identifier |
unexpected-character-in-attribute-name | ", ' or < in an attribute name; kept in the name |
unexpected-character-in-unquoted-attribute-value | ", ', <, = or ` in an unquoted value; kept in the value |
unexpected-equals-sign-before-attribute-name | = at the start of an attribute name; kept as its first character |
unexpected-null-character | U+0000 in the input; dropped or replaced by U+FFFD depending on where |
unexpected-solidus-in-tag | A / inside a tag not before >; ignored |
unknown-named-character-reference | &name; with a name not in the table; left as text |
Tree construction errors
The tree builder’s errors are not named. The viewer on this site reports them by what happened: a missing document type, an end tag with nothing open to close, an element closed while others are open inside it, a heading inside a heading, a start tag or text in the wrong place (for example text inside a table, which is foster-parented), an element left open at the end of the file, and so on.