<?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="index"-->
 <template>
  <do optional="false" label="Back Up" type="accept">
   <go enctype="application/x-www-form-urlencoded" method="get" sendreferer="true" href="#index"/>
  </do>
 </template>
 <card ordered="true" newcontext="false" id="index">
  <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="#reference"/>
  </do>
  <a href="#reference" accesskey="1">Page 1</a>
  <br/>
  <a href="#syntax" accesskey="2">Syntax</a>
  <br/>
  <a href="#attributes" accesskey="3">Attributes</a>
  <br/>
  <a href="#examples" accesskey="4">Examples</a>
  <br/>
  <a href="#differences" accesskey="5">Differences</a>
  <br/>
 </card>
 <card ordered="true" newcontext="false" id="reference">
  <do optional="false" type="options" label="Next">
   <go enctype="application/x-www-form-urlencoded" method="get" sendreferer="true" href="#syntax"/>
  </do>
  <!-- h3 -->
  <h3>The DOCTYPE declaration in HTML 5</h3>
  <p>The DOCTYPE declaration indicates that the content is a HTML document. The name parameter of the DOCTYPE declaration must be html, matching the name of the top element an HTML document. </p>
  <!-- h3 -->
  <h3>Converting to HTML 5</h3>
  <p>We are working on <a href="../../tutorials/converting-to-html-5.html">converting to HTML 5</a>. Please visit <a href="../doctype-declaration/index.html">HTML DOCTYPE Declaration</a> on the <a href="http://www.HTML-5.com/index.html">HTML 5 standard</a> version of this site. </p>
  <!-- h4 -->
  <h4>HTML Best Practices - Why specify a doctype?</h4>
  <p>From the W3C <i>Tips for Webmasters</i>: </p>
  <!--??? no template for "{http://XMLStyles.com/namespaces/styles}blockquote" ???-->
Why specify a DOCTYPE? Because it defines which version of (X)HTML your document is actually using, and this is a critical piece of information needed by browsers or other tools processing the document. <p>Since the document type is needed by web browsers, viewers or other tools in order to properly interpret a document as a particular version of HTML, the information provided by the DOCTYPE is especially important in situations where there are no HTTP headers available or when the headers do not indicate an XHTML/XML media type such as <span class="outlined">application/xhtml+xml</span>. Therefore, the DOCTYPE declaration is an important element when creating <a href="../../definitions/#polyglot">polyglot HTML documents</a>. </p>
  <p align="left">
   <a href="#syntax">Next: Syntax</a>
   <br/>
   <a href="#index">Back Up: Menu</a>
   <br/>
  </p>
 </card>
 <card ordered="true" newcontext="false" id="syntax">
  <do optional="false" type="options" label="Next">
   <go enctype="application/x-www-form-urlencoded" method="get" sendreferer="true" href="#attributes"/>
  </do>
  <!-- h3 -->
  <h3>Syntax of the DOCTYPE declaration for HTML 5</h3>
  <p align="left">&lt;!DOCTYPE html&gt;</p>
  <p>&lt;! indicates that this is an SGML declaration, DOCTYPE indicates the type of declaration is for the document type, html is the tag name of the top element of the document and &gt; ends the declaration. </p>
  <p align="left">
   <a href="#attributes">Next: Attributes</a>
   <br/>
   <a href="#reference">Prev: Page 1</a>
   <br/>
   <a href="#index">Back Up: Menu</a>
   <br/>
  </p>
 </card>
 <card ordered="true" newcontext="false" id="attributes">
  <do optional="false" type="options" label="Next">
   <go enctype="application/x-www-form-urlencoded" method="get" sendreferer="true" href="#examples"/>
  </do>
  <!-- h3 -->
  <h3>Attributes of the DOCTYPE Declaration</h3>
  <!--TO DO: uses XMLStyles_wml1.xsl - delete XMLStyles_wml.xsl-->
  <p align="left"> attribute</p>
  <p align="left">The  attribute </p>
  <p align="left">
   <a href="#examples">Next: Examples</a>
   <br/>
   <a href="#syntax">Prev: Syntax</a>
   <br/>
   <a href="#index">Back Up: Menu</a>
   <br/>
  </p>
 </card>
 <card ordered="true" newcontext="false" id="examples">
  <do optional="false" type="options" label="Next">
   <go enctype="application/x-www-form-urlencoded" method="get" sendreferer="true" href="#differences"/>
  </do>
  <!-- h3 -->
  <h3>Examples of the DOCTYPE declaration in HTML 5</h3>
  <!-- h4 -->
  <h4>DOCTYPE with no additional entity declarations</h4>
  <p/>
  <p align="left">&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;?xml-stylesheet type="text/xsl" href="/site-template.xsl"?&gt;&lt;!DOCTYPE html&gt;&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt; ...&lt;/html&gt;</p>
  <!-- h4 -->
  <h4>DOCTYPE with entities defined in an internal subset</h4>
  <p/>
  <p align="left">&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;?xml-stylesheet type="text/xsl" href="/site-template.xsl"?&gt;&lt;!DOCTYPE html [     &lt;!ENTITY nbsp "&amp;#160;"&gt;]&gt;&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt; ...&lt;/html&gt;</p>
  <p>If the HTML is being produced by software that does not allow the DTD to be omitted, the URI about:legacy-compat may be specified: </p>
  <p align="left">&lt;!DOCTYPE html SYSTEM "about:legacy-compat"&gt;</p>
  <p align="left">
   <a href="#differences">Next: Differences</a>
   <br/>
   <a href="#attributes">Prev: Attributes</a>
   <br/>
   <a href="#index">Back Up: Menu</a>
   <br/>
  </p>
 </card>
 <card ordered="true" newcontext="false" id="differences">
  <!-- h3 -->
  <h3>What's new in HTML 5</h3>
  <p>There is no DTD for HTML 5. Therefore, the DOCTYPE declaration should not contain a PUBLICFPI or SYSTEM identifier. If the SYSTEM identifier is specified, the value should always be about:legacy-compat. </p>
  <!-- h3 -->
  <h3>Differences between HTML 5 and earlier versions</h3>
  <p>The DOCTYPE declaration was introduced for validation of SGML documents and carried over to HTML, which uses markup tags similar to SGML. In SGML, XML and earlier versions of HTML, the DOCTYPE declaration points to a DTD, which describes the syntax that the markup language adheres to. Web browsers, which internally implement a rendering engine specific to HTML rather than relying on an external DTD, have used the document type declaration simply to determine how close to a supposedly <b>standard</b> version of HTML is being used. For that reason, the references to the DTD have been dropped from the DOCTYPE, but it is still included to indicate the HTML version. </p>
  <p>A few legacy values in the DOCTYPE declaration are <i>permitted, but obsolete</i>. The PUBLIC and SYSTEM DTD identifiers should be removed from these declarations: </p>
  <p align="left">&lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"&gt;&lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"&gt;&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"&gt;</p>
  <p>HTML pages with these DOCTYPEs may be interpreted as either one of the older (1997, 1999, 2000 or 2001, respectively) versions of HTML or as HTML 5, depending on the browser implementation. Once the PUBLIC, FPI and DTD identifier have been removed, the pages should only be interpreted as HTML 5 documents. </p>
  <p align="left">
   <a href="#examples">Prev: Examples</a>
   <br/>
   <a href="#index">Back Up: Menu</a>
   <br/>
  </p>
 </card>
</wml>

