<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="/styles/XMLStylesDoc_xhtml10_en.xsl"?><!DOCTYPE document SYSTEM "/schemas/XMLStyles10.dtd">
<document xmlns="http://XMLStyles.com/namespaces/styles" xmlns:xst="http://XMLStyles.com/namespaces/styles" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:date="http://exslt.org/dates-and-times">
   <noxml>
      <p xmlns="http://www.w3.org/1999/xhtml"/>
      <!-- You are viewing the source.  The following message should be ignored if you did "View Source" in your browser. -->
      <p xmlns="http://www.w3.org/1999/xhtml">
ATTENTION: XML WEB PAGES NOT SUPPORTED
   If you see this message, your current browser does not support the
   1999 XSLT 1.0 (or later) standard for XML web pages such as this one.
   Please upgrade your browser to a newer version
   that supports 1999 or later standards such as:
      Mozilla Firefox version 1.0.2 or later (GetFirefox -&gt; http://www.GetFirefox.com/)
      Netscape version 8 or later
      Safari version 1.3 or later
      Opera version 9 or later
      Microsoft Internet Explorer (MSIE) version 5 or later
   For further assistance, contact the software vendor for your browser.
   To go to the X<!-- extended HTML -->HTML version of this page click the following link:
<a href="index.html">index.html</a>
      </p>
      <p xmlns="http://www.w3.org/1999/xhtml">&#160;</p>
   </noxml>
   <path>/tags/xml-declaration/</path>
   <site>HTML 5 Reference</site>
   <logo xlink:type="simple" xlink:href="/images/html-5.jpg" media="screen" width="156" height="27">HTML 5 Reference</logo>
   <logo xlink:type="simple" xlink:href="/images/html-5.jpg" media="print" width="156" height="27">HTML 5 Reference</logo>
   <logo xlink:type="simple" xlink:href="/images/html-5.jpg" media="handheld" width="150" height="17">HTML 5 Reference</logo>
   <navigation where="sections">
      <label>HTML 5 Reference</label>
      <link xlink:type="simple" xlink:href="/index.xml">Home</link>
      <link xlink:type="simple" xlink:href="/tutorial/index.xml">Tutorial</link>
      <link xlink:type="simple" xlink:href="/tags/index.xml">HTML5 Tags</link>
      <link xlink:type="simple" xlink:href="/attributes/index.xml">Attributes</link>
      <link xlink:type="simple" xlink:href="/css-styles/index.xml">CSS Styles</link>
      <link xlink:type="simple" xlink:href="/metatags/index.xml">Metatags</link>
      <link xlink:type="simple" xlink:href="/cheat-sheet/index.xml">Cheat Sheet</link>
      <link xlink:type="simple" xlink:href="/examples/index.xml">Examples</link>
      <link xlink:type="simple" xlink:href="/definitions/index.xml">Definitions</link>
      <link xlink:type="simple" xlink:href="/diffs/index.xml">Differences</link>
      <link xlink:type="simple" xlink:href="/avoid/index.xml">Avoid</link>
      <link xlink:type="simple" xlink:href="/faqs/index.xml">HTML5 FAQs</link>
      <link xlink:type="simple" xlink:href="/prod/rssfeeds.cgi">RSS Feeds</link>
      <link xlink:type="simple" xlink:href="/prod/help/index.cgi">Help</link>
   </navigation>
   <navigation where="left">
      <label>HTML 5 Reference</label>
      <link xlink:type="simple" xlink:href="/tutorial/index.xml">HTML Tutorial</link>
      <link xlink:type="simple" xlink:href="/tags/index.xml">HTML 5 Tags</link>
      <link xlink:type="simple" xlink:href="/attributes/index.xml">HTML Attributes</link>
      <link xlink:type="simple" xlink:href="/css-styles/index.xml">CSS Styles</link>
      <link xlink:type="simple" xlink:href="/metatags/index.xml">HTML Metatags</link>
      <link xlink:type="simple" xlink:href="/cheat-sheet/index.xml">Cheat Sheet</link>
      <link xlink:type="simple" xlink:href="/examples/index.xml">HTML Examples</link>
      <link xlink:type="simple" xlink:href="/definitions/index.xml">Definitions</link>
      <link xlink:type="simple" xlink:href="/diffs/index.xml">HTML 5 Changes</link>
      <link xlink:type="simple" xlink:href="/avoid/index.xml">Things to Avoid</link>
      <link xlink:type="simple" xlink:href="/faqs/index.xml">HTML 5 FAQs</link>
      <link xlink:type="simple" xlink:href="/prod/help/index.cgi">Help</link>
      <link xlink:type="simple" xlink:href="/prod/help/index.cgi?p=about">About</link>
   </navigation>
   <section type="body">
      <pages name="index">
         <navigation media="handheld" where="up">
            <link xlink:type="simple" xlink:href="../index.mobile.html">HTML Tags</link>
         </navigation>
         <navigation media="handheld" where="next">
            <link xlink:type="simple" xlink:href="../xml-stylesheet-instruction/index.mobile.html">The xml-stylesheet Instruction</link>
         </navigation>
         <page id="N100AC" name="index">
            <label>xml decl.</label>
            <title>xml Declaration</title>
            <h2>The xml Declaration</h2>
            <subpage id="N100B4" name="reference">
               <h3>The <code>xml</code> declaration in HTML 5</h3>
               <p>The <code>xml</code> declaration is the first line of code
                  and indicates that the content is a
                  <acronym term="Hypertext Markup Language">HTML</acronym> document.
               </p>
            </subpage>
            <h3>Converting to HTML 5</h3>
            <p>We are working on <link xlink:type="simple" xlink:href="../../tutorials/converting-to-html-5.html">converting to HTML 5</link>.
               Please visit <link xlink:type="simple" xlink:href="../xml-declaration/index.html">XML Declaration for HTML</link> on the
               <link xlink:type="simple" xlink:href="http://www.HTML-5.com/index.html">HTML 5 standard</link> version of this site.
            </p>
            <subpage id="N100D7" name="syntax">
               <label>Syntax</label>
               <title>&lt;?xml?&gt; Declaration Syntax</title>
               <h3>Syntax of the &lt;?xml?&gt; declaration</h3>
            </subpage>
            <subpage id="N100DF" name="attributes">
               <label>Attributes</label>
               <title>Attributes of the xml Declaration</title>
               <h4>Attributes of the <code>xml</code> declaration</h4>
               <dl>
                  <di>
                     <dt>
                        <code>version</code> attribute</dt>
                     <dd>The version attribute is coded as <code>version="1.0"</code>,
                        which indicates the document follows the XML version 1.0 syntax.
                        The document should be coded to be "well-formed",
                        even if it is not an entirely "valid" HTML document.
                     </dd>
                     <dt>
                        <code>encoding</code> attribute</dt>
                     <dd>The <code>encoding</code> attribute indicates what character encoding
                        has been used to encode the HTML document as a file or byte input stream.
                        Most importantly, among other things, this determines how many bytes of
                        raw data are consumed to compose each character of the decoded document.
                     </dd>
                  </di>
               </dl>
            </subpage>
            <subpage id="examples" name="examples">
               <label>Examples</label>
               <title>HTML 5 Examples</title>
               <h3>Examples of the <code>xml</code> declaration in HTML 5</h3>
               <p>The xml declaration appears at the very beginning of an HTML document:
               </p>
               <blockcode>
                  <l class="output">&lt;?xml version="1.0" encoding="UTF-8"?&gt;</l>
                  <l>&lt;?xml-stylesheet type="text/xsl" href="/site-template.xsl"?&gt;</l>
                  <l class="output">&lt;!DOCTYPE html&gt;</l>
                  <l class="output">&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;</l>
                  <l class="output">   ...</l>
                  <l class="output">&lt;/html&gt;</l>
               </blockcode>
               <p>It is recommended that the encoding be specified using the preferred (MIME) name as
                  specified in the <acronym term="Internet Assigned Numbers Authority">IANA</acronym>'s
                  <link xlink:type="simple" xlink:href="http://www.iana.org/assignments/character-sets">Official Names for Character Sets</link>.
                  Some examples:
               </p>
               <blockcode>
                  <l class="output">&lt;?xml version="1.0" encoding="UTF-8"?&gt;</l>
                  <l class="output">&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;</l>
                  <l class="output">&lt;?xml version="1.0" encoding="US-ASCII"?&gt;</l>
                  <l class="output">&lt;?xml version="1.0" encoding="EUC-JP"?&gt;</l>
                  <l class="output">&lt;?xml version="1.0" encoding="UTF-16"?&gt;</l>
                  <l class="output">&lt;?xml version="1.0" encoding="ISO-10646-UCS-2"?&gt;</l>
                  <l class="output">&lt;?xml version="1.0" encoding="ISO-10646-UCS-4"?&gt;</l>
               </blockcode>
            </subpage>
            <subpage id="differences" name="differences">
               <label>Differences</label>
               <title>Changes in HTML 5</title>
               <h3>What's new in HTML 5</h3>
               <h3>Differences between HTML 5 and earlier versions</h3>
               <p>The xml declaration does not appear in HTML documents conforming
                  to the 1997 HTML version 4 standard.  For 2000 and later XHTML 1.x
                  documents, the xml declaration was optional.
                  For HTML version 5 documents, it's use is highly recommended.
               </p>
            </subpage>
            <updated local="2010-09-19">Sunday September 19, 2010</updated>
         </page>
      </pages>
   </section>
   <copyright>Copyright © 2010 Accilent<span class="sup">®</span> Corp. Alteration of content, including addition of any function such as hypertext links or pop-up advertising, or interference with the hypertext links or other functions of this site is expressly prohibited.</copyright>
   <disclaimer>All information, links, forms, applications and other items on this site or obtained from it are provided <b>AS IS</b>, WITHOUT WARRANTY OF ANY KIND EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.</disclaimer>
</document>

