<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN" "http://www.wapforum.org/DTD/wml13.dtd">
<wml>
 <!-- page name="page-structure"-->
 <template>
  <do optional="false" label="Back Up" type="accept">
   <go enctype="application/x-www-form-urlencoded" method="get" sendreferer="true" href="#page-structure"/>
  </do>
 </template>
 <card ordered="true" newcontext="false" id="page-structure">
  <do optional="false" label="Back Up" type="accept">
   <noop/>
  </do>
  <do optional="false" label="Back" type="prev">
   <prev/>
  </do>
  <do optional="false" type="options" label="Next">
   <go enctype="application/x-www-form-urlencoded" method="get" sendreferer="true" href="#html5-headers"/>
  </do>
  <a href="#html5-headers" accesskey="1">HTTP Headers</a>
  <br/>
  <a href="#html5-mime-type" accesskey="2">HTML 5 MIME Type</a>
  <br/>
  <a href="#html-5-serialization" accesskey="3">Page 3</a>
  <br/>
  <a href="#html5-doctype" accesskey="4">HTML Code</a>
  <br/>
 </card>
 <card ordered="true" newcontext="false" id="html5-headers">
  <do optional="false" type="options" label="Next">
   <go enctype="application/x-www-form-urlencoded" method="get" sendreferer="true" href="#html5-mime-type"/>
  </do>
  <!-- h3 -->
  <h3>HTTP Headers for HTML</h3>
  <p>The HTTP headers which control how an HTML 5 document is displayed might look like this: </p>
  <p align="left">Content-Type: application/xhtml+xml; charset=UTF-8Cache-Control: max-age=120X-UA-Compatible: IE=8</p>
  <p>It is highly recommended that the charset attribute specifying the character encoding of the HTML page be included in the Content-Type header for non-XML user agents in addition to the <a href="../tags/xml-declaration/">xml declaration</a>. </p>
  <p align="left">
   <a href="#html5-mime-type">Next: HTML 5 MIME Type</a>
   <br/>
   <a href="#page-structure">Back Up: Menu</a>
   <br/>
  </p>
 </card>
 <card ordered="true" newcontext="false" id="html5-mime-type">
  <do optional="false" type="options" label="Next">
   <go enctype="application/x-www-form-urlencoded" method="get" sendreferer="true" href="#html-5-serialization"/>
  </do>
  <!-- h3 -->
  <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 API to send the proper HTTP headers. </p>
  <p>For static web pages, it may be necessary to add the MIME Type for HTML 5 <a href="./definitions/#polyglot">
    <!--??? no template for "{http://XMLStyles.com/namespaces/styles}dfn" ???-->
Polyglot Documents</a> 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>
  <p align="left">DirectoryIndex index.htmlErrorDocument 404 /error.htmlAddType application/xhtml+xml;charset=UTF-8 html</p>
  <p align="left">
   <a href="#html-5-serialization">Next: Page 3</a>
   <br/>
   <a href="#html5-headers">Prev: HTTP Headers</a>
   <br/>
   <a href="#page-structure">Back Up: Menu</a>
   <br/>
  </p>
 </card>
 <card ordered="true" newcontext="false" id="html-5-serialization">
  <do optional="false" type="options" label="Next">
   <go enctype="application/x-www-form-urlencoded" method="get" sendreferer="true" href="#html5-doctype"/>
  </do>
  <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>
  <p align="left"/>
  <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. <a href="../definitions/#polyglot">Polyglot HTML documents</a> 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>
  <p align="left">
   <a href="#html5-doctype">Next: HTML Code</a>
   <br/>
   <a href="#html5-mime-type">Prev: HTML 5 MIME Type</a>
   <br/>
   <a href="#page-structure">Back Up: Menu</a>
   <br/>
  </p>
 </card>
 <card ordered="true" newcontext="false" id="html5-doctype">
  <do optional="false" type="options" label="Next">
   <go enctype="application/x-www-form-urlencoded" method="get" sendreferer="true" href="style-sheets.wml"/>
  </do>
  <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>
  <p align="left">&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;!DOCTYPE html&gt;&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;   &lt;head&gt;     &lt;title&gt;Example Only&lt;/title&gt;   &lt;/head&gt;   &lt;body&gt;     &lt;p&gt;This is only an example. For more information, see        &lt;a href="<a href="http://www.ExampleOnly.com/">http://www.ExampleOnly.com/</a>" alt="ExampleOnly.com"/&gt;     &lt;/p&gt;   &lt;/body&gt;&lt;/html&gt;</p>
  <p align="left">
   <a href="style-sheets.wml">Next: Style Sheets</a>
   <br/>
   <a href="#html-5-serialization">Prev: Page 3</a>
   <br/>
   <a href="#page-structure">Back Up: Menu</a>
   <br/>
  </p>
 </card>
</wml>

