spec/Overview.html 1.1727 2556 Require <meta charset> within the first

Require <meta charset> within the first 512 bytes. (credit: hs) (whatwg
r2556)

content
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1727.html#attr-meta-content
4.2.5 The meta element
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1727.html#meta
Encoding declaration state
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1727.html#attr-meta-http-equiv-content-type
charset
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1727.html#attr-meta-charset
character encoding declaration
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1727.html#character-encoding-declaration
The element containing the character encoding declaration must be serialised completely within the first 512 bytes of the document.
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1727.html#charset512

http://people.w3.org/mike/diffs/html5/spec/Overview.diff.html
http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.1726&r2=1.1727&f=h
http://html5.org/tools/web-apps-tracker?from=2555&to=2556

===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.1726
retrieving revision 1.1727
diff -u -d -r1.1726 -r1.1727
--- Overview.html 24 Dec 2008 07:01:44 -0000 1.1726
+++ Overview.html 24 Dec 2008 08:18:15 -0000 1.1727
@@ -7061,7 +7061,7 @@
   normatively required in the definition of dom-linkstyle-disabled --><h4 id=meta><span class=secno>4.2.5 </span>The <dfn><code>meta</code></dfn> element</h4><dl class=element><dt>Categories</dt>
    <dd><a href=#metadata-content-0>Metadata content</a>.</dd>
    <dt>Contexts in which this element may be used:</dt>
-   <dd>If the <code title=attr-meta-charset><a href=#attr-meta-charset>charset</a></code> attribute is present, or if the element is in the <a href=#attr-meta-http-equiv-content-type title=attr-meta-http-equiv-content-type>Encoding declaration state</a>: as the first element in a <code><a href=#the-head-element>head</a></code> element.</dd>
+   <dd>If the <code title=attr-meta-charset><a href=#attr-meta-charset>charset</a></code> attribute is present, or if the element is in the <a href=#attr-meta-http-equiv-content-type title=attr-meta-http-equiv-content-type>Encoding declaration state</a>: in a <code><a href=#the-head-element>head</a></code> element.</dd>
    <dd>If the <code title=attr-meta-http-equiv><a href=#attr-meta-http-equiv>http-equiv</a></code> attribute is present, and the element is not in the <a href=#attr-meta-http-equiv-content-type title=attr-meta-http-equiv-content-type>Encoding declaration state</a>: in a <code><a href=#the-head-element>head</a></code> element.</dd>
    <dd>If the <code title=attr-meta-http-equiv><a href=#attr-meta-http-equiv>http-equiv</a></code> attribute is present, and the element is not in the <a href=#attr-meta-http-equiv-content-type title=attr-meta-http-equiv-content-type>Encoding declaration state</a>: in a <code><a href=#the-noscript-element>noscript</a></code> element that is a child of a <code><a href=#the-head-element>head</a></code> element.</dd>
    <dd>If the <code title=attr-meta-name><a href=#attr-meta-name>name</a></code> attribute is present: where <a href=#metadata-content-0>metadata content</a> is expected.</dd>
@@ -7097,10 +7097,8 @@
   document. This is called a <a href=#character-encoding-declaration>character encoding
   declaration</a>.<p>The <code title=attr-meta-charset><a href=#attr-meta-charset>charset</a></code> attribute may
   be specified in <a href=#html5 title=HTML5>HTML documents</a> only, it
-  must not be used in <a href=#xhtml5 title=XHTML>XML documents</a>. If the
-  <code title=attr-meta-charset><a href=#attr-meta-charset>charset</a></code> attribute is
-  specified, the element must be the first element in <a href=#the-head-element-0>the
-  <code>head</code> element</a> of the file.<p>The <dfn id=attr-meta-content title=attr-meta-content><code>content</code></dfn>
+  must not be used in <a href=#xhtml5 title=XHTML>XML documents</a>. There
+  must not be more than one element with a <code title=attr-meta-charset><a href=#attr-meta-charset>charset</a></code> attribute per document.<p>The <dfn id=attr-meta-content title=attr-meta-content><code>content</code></dfn>
   attribute gives the value of the document metadata or pragma
   directive when the element is used for those purposes. The allowed
   values depend on the exact context, as described in subsequent
@@ -7361,11 +7359,8 @@
 
     <p>If the document contains a <code><a href=#meta>meta</a></code> element in the
     <a href=#attr-meta-http-equiv-content-type title=attr-meta-http-equiv-content-type>Encoding
-    declaration state</a> then that element must be the first
-    element in the document's <code><a href=#the-head-element>head</a></code> element, and the
-    document must not contain a <code><a href=#meta>meta</a></code> element with the
-    <code title=attr-meta-charset><a href=#attr-meta-charset>charset</a></code> attribute
-    present.</p>
+    declaration state</a>, then the document must not contain a
+    <code><a href=#meta>meta</a></code> element with the <code title=attr-meta-charset><a href=#attr-meta-charset>charset</a></code> attribute present.</p>
 
     <p>The <a href=#attr-meta-http-equiv-content-type title=attr-meta-http-equiv-content-type>Encoding
     declaration state</a> may be used in <a href=#html5 title=HTML5>HTML
@@ -7557,6 +7552,10 @@
    the use of <a href=#syntax-charref title=syntax-charref>character references</a>
    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.
+
   </ul><p>If the document does not start with a BOM, and if its encoding is
   not explicitly given by <a href=#content-type-0 title=Content-Type>Content-Type
   metadata</a>, then the character encoding used must be an

Received on Wednesday, 24 December 2008 08:21:40 UTC