<?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>/tutorials/</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 id="body" type="body">
      <pages name="index">
         <navigation where="pages">
            <label>index</label>
            <link xlink:type="simple" xlink:href="index.xml">index</link>
            <link xlink:type="simple" xlink:href="page-structure.xml">Tutorial</link>
            <link xlink:type="simple" xlink:href="style-sheets.xml">Style Sheets</link>
            <link xlink:type="simple" xlink:href="html-templates.xml">XSLT Style Sheets</link>
            <link xlink:type="simple" xlink:href="css-stylesheets.xml">CSS StyleSheets</link>
            <link xlink:type="simple" xlink:href="namespaces.xml">Namespaces</link>
            <link xlink:type="simple" xlink:href="sections.xml">Sections</link>
            <link xlink:type="simple" xlink:href="style-tags.xml">Style Tags</link>
            <link xlink:type="simple" xlink:href="lists.xml">Lists</link>
            <link xlink:type="simple" xlink:href="groups.xml">Groups</link>
            <link xlink:type="simple" xlink:href="acronyms.xml">Acronyms</link>
            <link xlink:type="simple" xlink:href="times.xml">Dates/Times</link>
            <link xlink:type="simple" xlink:href="tables.xml">Tables</link>
            <link xlink:type="simple" xlink:href="forms.xml">Forms</link>
            <link xlink:type="simple" xlink:href="gauges.xml">Gauges</link>
         </navigation>
         <page id="N100BF" name="page-structure">
            <label>Tutorial</label>
            <title>HTML 5 Tutorial</title>
            <h2>HTML 5 Document Structure</h2>
            <subpage id="N100C7" name="html5-headers">
               <label>HTTP Headers</label>
               <h3>HTTP Headers for HTML</h3>
               <p>The <acronym term="Hypertext Transfer Protocol">HTTP</acronym> headers
                  which control how an HTML 5 document is displayed might look like this:
               </p>
               <blockcode>
                  <l>Content-Type: application/xhtml+xml; charset=UTF-8</l>
                  <l>Cache-Control: max-age=120</l>
                  <l>X-UA-Compatible: IE=8</l>
               </blockcode>
               <p>It is highly recommended that the <code>charset</code> attribute
                  specifying the character encoding of the HTML page be included in the
                  <code>Content-Type</code> header for non-XML user agents in addition to the
                  <link xlink:type="simple" xlink:href="../tags/xml-declaration/">xml declaration</link>.
               </p>
            </subpage>
            <h3>Converting to HTML 5</h3>
            <p>We are working on <link xlink:type="simple" xlink:href="converting-to-html-5.html">converting to HTML 5</link>.
               Please visit <link xlink:type="simple" xlink:href="basic-html-structure.html">Basic HTML Structure</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="N100FA" name="html5-mime-type">
               <label>HTML 5 MIME Type</label>
               <h3>How to set the Content-Type for the HTML 5 MIME Type</h3>
               <p>If the web documents are being created by a program, the programming language
                  probably has an <acronym term="Application Programming Interface">API</acronym>
                  to send the proper HTTP headers.
               </p>
               <p>For static web pages, it may be necessary to add the MIME Type for HTML 5
                  <link xlink:type="simple" xlink:href="./definitions/#polyglot">
                     <dfn>Polyglot Documents</dfn>
                  </link>
                  to the HTTP web server configuration to send the appropriate Content-Type header.
                  With the Apache HTTP Server, for example, the HTML 5 MIME Type can be added to the .htaccess file(s):
               </p>
               <blockcode>
                  <l>DirectoryIndex index.html</l>
                  <l>ErrorDocument 404 /error.html</l>
                  <l>AddType application/xhtml+xml;charset=UTF-8 html</l>
               </blockcode>
            </subpage>
            <subpage id="N10115" name="html-5-serialization">
               <p>The type of serialization of an HTML document refers to the syntax used when converting
                  the HTML from an internal document model to a stream of bytes to be stored or transmitted.
                  The XML style of serialization has a number of advantages, including:
               </p>
               <ul>
                  <li>support for tags with non-HTML namespaces, such as <link xlink:type="simple" xlink:href="../tags/rdf-tag/">rdf:RDF</link>, and</li>
                  <li>
                     <link xlink:type="simple" xlink:href="../definitions/#polyglot">it's required for <dfn>Polyglot Documents</dfn>
                     </link>
                  </li>
               </ul>
               <p>HTML 5 has been designed to be relatively backward compatible with both the
                  1997-1999 HTML 4 standard and the 2000-2001 XHTML 1.x W3C recommendation of HTML.
                  The XML serialization of HTML 5 merges these two standards, and is already
                  understood by virtually all web browsers including XHTML-based mobile browsers.
                  <link xlink:type="simple" xlink:href="../definitions/#polyglot">Polyglot HTML documents</link>
                  can be delivered either as <span class="outlined">text/html</span> to traditional
                  web browsers or as <span class="outlined">application/xhtml+xml</span> to
                  web browsers on computers as well as in cell phones and other handheld devices.
                  If you start creating polyglot documents now your web pages will be
                  well positioned for both current and future HTML browsers and mobile devices.
               </p>
            </subpage>
            <subpage id="N10137" name="html5-doctype">
               <label>HTML Code</label>
               <p>The typical code for a simple HTML version 5 page would look something like the following
                  (this is the HTML equivalent of a "Hello World" program):
               </p>
               <blockcode>
                  <l>&lt;?xml version="1.0" encoding="UTF-8"?&gt;</l>
                  <l>&lt;!DOCTYPE html&gt;</l>
                  <l>&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;</l>
                  <l>   &lt;head&gt;</l>
                  <l>     &lt;title&gt;Example Only&lt;/title&gt;</l>
                  <l>   &lt;/head&gt;</l>
                  <l>   &lt;body&gt;</l>
                  <l>     &lt;p&gt;This is only an example. For more information, see </l>
                  <l>       &lt;a href="<link xlink:type="simple" xlink:href="http://www.ExampleOnly.com/">http://www.ExampleOnly.com/</link>" alt="ExampleOnly.com"/&gt;</l>
                  <l>     &lt;/p&gt;</l>
                  <l>   &lt;/body&gt;</l>
                  <l>&lt;/html&gt;</l>
               </blockcode>
            </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>

