HTML Standard Tracker

Diff (omit for latest revision)
Filter

Short URL: http://html5.org/r/2556

File a bug

SVNBugCommentTime (UTC)
2556[Authors] [Conformance Checkers] Require <meta charset> within the first 512 bytes. (credit: hs)2008-12-24 08:18
Index: source
===================================================================
--- source	(revision 2555)
+++ source	(revision 2556)
@@ -8986,7 +8986,7 @@
    <dt>Categories</dt>
    <dd><span>Metadata content</span>.</dd>
    <dt>Contexts in which this element may be used:</dt>
-   <dd>If the <code title="attr-meta-charset">charset</code> attribute is present, or if the element is in the <span title="attr-meta-http-equiv-content-type">Encoding declaration state</span>: as the first element in a <code>head</code> element.</dd>
+   <dd>If the <code title="attr-meta-charset">charset</code> attribute is present, or if the element is in the <span title="attr-meta-http-equiv-content-type">Encoding declaration state</span>: in a <code>head</code> element.</dd>
    <dd>If the <code title="attr-meta-http-equiv">http-equiv</code> attribute is present, and the element is not in the <span title="attr-meta-http-equiv-content-type">Encoding declaration state</span>: in a <code>head</code> element.</dd>
    <dd>If the <code title="attr-meta-http-equiv">http-equiv</code> attribute is present, and the element is not in the <span title="attr-meta-http-equiv-content-type">Encoding declaration state</span>: in a <code>noscript</code> element that is a child of a <code>head</code> element.</dd>
    <dd>If the <code title="attr-meta-name">name</code> attribute is present: where <span>metadata content</span> is expected.</dd>
@@ -9038,10 +9038,9 @@
 
   <p>The <code title="attr-meta-charset">charset</code> attribute may
   be specified in <span title="HTML5">HTML documents</span> only, it
-  must not be used in <span title="XHTML">XML documents</span>. If the
-  <code title="attr-meta-charset">charset</code> attribute is
-  specified, the element must be the first element in <span>the
-  <code>head</code> element</span> of the file.</p>
+  must not be used in <span title="XHTML">XML documents</span>. There
+  must not be more than one element with a <code
+  title="attr-meta-charset">charset</code> attribute per document.</p>
 
   <p>The <dfn title="attr-meta-content"><code>content</code></dfn>
   attribute gives the value of the document metadata or pragma
@@ -9387,11 +9386,9 @@
 
     <p>If the document contains a <code>meta</code> element in the
     <span title="attr-meta-http-equiv-content-type">Encoding
-    declaration state</span> then that element must be the first
-    element in the document's <code>head</code> element, and the
-    document must not contain a <code>meta</code> element with the
-    <code title="attr-meta-charset">charset</code> attribute
-    present.</p>
+    declaration state</span>, then the document must not contain a
+    <code>meta</code> element with the <code
+    title="attr-meta-charset">charset</code> attribute present.</p>
 
     <p>The <span title="attr-meta-http-equiv-content-type">Encoding
     declaration state</span> may be used in <span title="HTML5">HTML
@@ -9649,6 +9646,10 @@
    the use of <span title="syntax-charref">character references</span>
    or character escapes of any kind.</li>
 
+   <li id="charset512">The element containing the character encoding
+   declaration must be serialised completely within the first 512
+   bytes of the document.</p>
+
   </ul>
 
   <p>If the document does not start with a BOM, and if its encoding is

|