<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:d="http://suika.fam.cx/~wakaba/archive/2007/wdcc-desc/"
    id="error-description">
<head>
<title xml:lang="en">Description of Errors &#x2014; 
Web Document Conformance Checker (BETA)</title>
<link rel="stylesheet" href="cc-style"/>
<link rel="license" href="#license"/>
</head>
<body>
<h1>Description of Errors</h1>

<section id="html5-character-encoding">
<h2>HTML5 Character Encoding Errors</h2>

<d:item name="character encoding" class="format-charset must" level="m">
  <d:message xml:lang="en">Character encoding <code><var>$0</var></code>
  is not allowed for <abbr>HTML</abbr> document.</d:message>
  <d:desc xml:lang="en">
    <p>The character encoding used for the document is not allowed
    for <abbr>HTML</abbr> document.  The document is non‐conforming.</p>
  </d:desc>
</d:item>

<d:item name="character encoding" class="format-charset should"
    level="s">
  <d:message xml:lang="en">Character encoding <code><var>$0</var></code>
  should not be used for <abbr>HTML</abbr> document.</d:message>
  <d:desc xml:lang="en">
    <p>The character encoding used for the document is not recommended
    for <abbr>HTML</abbr> document.  The document is non‐conforming
    unless there is any good reason to use that encoding.</p>
  </d:desc>
</d:item>

<d:item name="character encoding" class="format-charset warning"
    level="w">
  <d:message xml:lang="en">Use of UTF-8 is encouraged.</d:message>
  <d:desc xml:lang="en">
    <p>Use of UTF-8 as the character encoding of the document is encouraged,
    though the use of another character encoding is conforming.</p>
  </d:desc>
</d:item>

<d:item name="character encoding" class="format-charset unsupported"
    level="unsupported">
  <d:message xml:lang="en">Conformance for character encoding requirements
  cannot be checked.</d:message>
  <d:desc xml:lang="en">
    <p>The conformance checker cannot detect whether the input document
    met the requirements on character encoding, since the document
    is not inputed as a serialized byte sequence.  The document is
    not conforming if it is not encoded in an appropriate character
    encoding with appropriate labeling.</p>
  </d:desc>
</d:item>

<d:item name="no character encoding declaration" class="format-charset error"
    level="m">
  <d:message xml:lang="en">There is no character encoding
  declaration.</d:message>
  <d:desc xml:lang="en">
    <p>The document does not contain a character encoding 
    declaration.  Unless the character encoding is explicitly 
    specified in lower‐level protocol, e.g. in <abbr>HTTP</abbr>,
    or is implied by <abbr>BOM</abbr>, there must be a character
    encoding declaration.  The document is non‐conforming.</p>

    <p>The long character encoding declaration syntax
    <code class="html bad example">&lt;meta http-equiv="Content-Type" content="text/html; charset=<var>charset-name</var>"></code>
    is obsolete.  The new syntax is:</p>
    <pre class="html example"><code>&lt;meta charset="<var>charset-name</var>"></code></pre>

    <p>Note that the <code>encoding</code> declaration in <abbr>XML</abbr> 
    declaration has no effect for <abbr>HTML</abbr> document.</p>
  </d:desc>
</d:item>

<d:item name="non ascii superset" class="format-charset error"
    level="m">
  <d:message xml:lang="en">No character encoding metadata is found
  in lower‐level protocol nor is there <abbr>BOM</abbr>, while
  character encoding <code><var>$0</var></code>
  is not a superset of <abbr>ASCII</abbr>.</d:message>
  <d:desc xml:lang="en">
    <p>The document is not labeled with character encoding name
    in lower‐level protocol, e.g. in <abbr>HTTP</abbr>, and
    the document is not begin with <abbr>BOM</abbr>.  In addition,
    the character encoding of the document is not a superset of
    <abbr>ASCII</abbr>.  The document is non‐conforming.</p>

    <p>Unless there is a <abbr>BOM</abbr>, the character encoding
    for the document must be specified in e.g. <abbr>HTTP</abbr>‐level,
    as:</p>
    <pre class="http example"><code>Content-Type: text/html; charset=<var>charset-name</var></code></pre>

    <p>Existence of <abbr>HTML</abbr> character encoding declaration, i.e.
    <code class="html example">&lt;meta charset="<var>charset-name</var>"></code>,
    does not allow to omit <code>charset</code> parameter
    for <abbr>HTML</abbr> document encoded in non‐<abbr>ASCII</abbr>
    compatible encoding.</p>

    <p>Character encodings <code>Shift_JIS</code>, <code>Windows-31J</code>,
    and <code>ISO-2022-JP</code> are <em>not</em> a superset of
    <abbr>ASCII</abbr> for the purpose of <abbr>HTML</abbr> conformance.</p>
  </d:desc>
</d:item>

<d:item name="charset label detected" class="format-charset warning"
    level="w">
  <d:message xml:lang="en">While parsing the document as
  <code><var>$0</var></code>, a character encoding declaration specifying
  character encoding as <code><var>$1</var></code> is found.  The document
  is reparsed.</d:message>
  <d:desc xml:lang="en">
    <p>While parsing a document in a character encoding,
    a character encoding declaration which declares the character
    encoding of the document as another character encoding is found.
    The occurence of this warning itself does not make the document
    non‐conforming.  However, the failure of the first attempt to
    to detect the character encoding might be the result of non‐conformance 
    of the document.</p>

    <p>The document will be reparsed from the beginning.  Some error
    or warning might be reported again.</p>

    <p>These are suggestions to avoid this warning:</p>
    <ul>
    <li>Specify <code>charset</code> parameter in the <code>Content-Type</code>
    field in the <abbr>HTTP</abbr> header, as:
    <pre class="HTTP example"><code>Content-Type: text/html; charset="<var>charset-name</var>"</code></pre></li>
    <li>Put the character encoding declaration
    (<code class="html example">&lt;meta charset="<var>charset-name</var>"></code>)
    just after <code class="html example">&lt;head></code> start tag.</li>
    <li>Use <code>UTF-8</code>.</li>
    </ul>
  </d:desc>
</d:item>
</section>

<section id="html5-tokenize-error">
<h2>HTML5 Parse Errors in Tokenization Stage</h2>

<d:item name="after html"
    class="parse-error">
  <d:message xml:lang="en">Tag <code>&lt;<var>$0</var>&gt;</code>
  is not allowed after the end tag <code>&lt;/html></code>.</d:message>
  <d:desc xml:lang="en">
    <p>The start or end tag of an element appears after the
    <code>html</code> element has been closed.  The document is
    non-conforming.</p>

    <p>Any content of the document other than comments
    must be put into the <code>html</code> element.</p>
  </d:desc>
</d:item>

<d:item name="after body"
    class="parse-error">
  <d:message xml:lang="en">Tag <code>&lt;<var>$0</var>&gt;</code>
  is not allowed after the end tag <code>&lt;/body></code>.</d:message>
  <d:desc xml:lang="en">
    <p>The start or end tag of an element appears after the
    <code>body</code> element has been closed.  The document is
    non-conforming.</p>

    <p>Any content of the document other than <code>head</code>
    contents and comments must be put into the <code>body</code>
    element.</p>
  </d:desc>
</d:item>

<d:item name="bare ero"
    class="tokenize-error">
  <d:message xml:lang="en">The <code>&amp;</code> character must
  introduce a reference.</d:message>
  <d:desc xml:lang="en">
    <p>An <code>&amp;</code> character which
    is not part of any reference appears in the input stream.
    The document is non‐conforming.</p>

    <p><em>Any <code>&amp;</code> character in URI (or IRI)
    must be escaped as <code class="example">&amp;amp;</code>.</em></p>

    <p>The <code>&amp;</code> character must
    be the first character of a reference:
      <dl class="switch">
      <dt>Named entity reference</dt>
          <dd><pre class="html example"><code>&amp;<var>entity-name</var>;</code></pre>
          where <var>entity-name</var> is the name of the
