You are currently using a web browser that does not support HTML 5 with style sheets. Please try the standard HTML 5, XHTML 1 or XHTML 1 Mobile version of this page instead.
DOCTYPE
declaration in HTML 5The 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.
We are working on converting to HTML 5. Please visit HTML DOCTYPE Declaration on the HTML 5 standard version of this site.
From the W3C Tips for Webmasters:
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.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 application/xhtml+xml. Therefore, the DOCTYPE declaration is an important element when creating polyglot HTML documents.
<!DOCTYPE> Declaration Syntax |
---|
Syntax of the
|
Attributes of the DOCTYPE Declaration |
---|
Attributes of the
|
Changes in HTML 5 |
---|
What's new in HTML 5There is no
DTD
for HTML 5.
Therefore, the DOCTYPE declaration should not contain a Differences between HTML 5 and earlier versionsThe A few legacy values in the
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
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 |
Last updated Sunday September 19, 2010
Printer-friendly PDF* format:
You are currently viewing this page in HTML 5 Style Sheet* format (* see Clicklets for more infomation). This document is also available in HTML 5 XML*HTML 5 non-XML*XHTML 1 Style Sheet*XHTML 1*XML* HTML 4* XHTML Mobile* WML Mobile* and printer-friendly PDF* formats. This is accomplished with Single Source Publishing, a content management system that uses templates in XSLT style sheets provided by XML Styles .com to transform the source content for various content delivery channels. There is also RDF* metadata that describes the content of this document.