html 5 reference

Upload: felipedibo

Post on 10-Apr-2018

254 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/8/2019 HTML 5 Reference

    1/86

    HTML 5 ReferenceA Web Developers Guide to HTML 5

    W3C Editors Draft 23 March 2009

    This version:http://www.w3.org/TR/2009/ED-html5-author-20090323

    Latest version:http://www.w3.org/TR/

    Previous version:No previous versions.

    Editors:Lachlan Hunt (Opera Software ASA) [email protected]

    [Copyright licence pending]

    Abstract

    This document illustrates how to write HTML 5 documents, focussing onsimplicity and practical applications for beginners while also providing in depthinformation for more advanced web developers.

    Status of this document

    This section describes the status of this document at the time of its publication.Other documents may supersede this document. A list of current W3Cpublications and the latest revision of this technical report can be found in theW3C technical reports index at http://www.w3.org/TR/.

    This document is an Editors Draft of the HTML 5 Reference produced by theHTML Working Group, part of the HTML Activity. The working group is workingon HTML 5 (see the HTML 5 Editor's draft). The appropriate forum for commentson this document [email protected] (public archive) [email protected] (public archive).

    Publication as a Working Group Note does not imply endorsement by the W3CMembership. This is a draft document and may be updated, replaced orobsoleted by other documents at any time. It is inappropriate to cite thisdocument as other than work in progress.

    http://www.w3.org/TR/http://lachy.id.au/http://www.opera.com/mailto:[email protected]://lists.w3.org/Archives/Public/spec-prod/2007OctDec/0007.htmlhttp://www.w3.org/TR/http://www.w3.org/html/wg/http://www.w3.org/MarkUp/Activityhttp://www.w3.org/html/wg/html5/mailto:[email protected]://lists.w3.org/Archives/Public/public-html-comments/mailto:[email protected]:[email protected]://lists.w3.org/Archives/Public/public-html/http://www.w3.org/http://www.w3.org/TR/http://lachy.id.au/http://www.opera.com/mailto:[email protected]://lists.w3.org/Archives/Public/spec-prod/2007OctDec/0007.htmlhttp://www.w3.org/TR/http://www.w3.org/html/wg/http://www.w3.org/MarkUp/Activityhttp://www.w3.org/html/wg/html5/mailto:[email protected]://lists.w3.org/Archives/Public/public-html-comments/mailto:[email protected]:[email protected]://lists.w3.org/Archives/Public/public-html/
  • 8/8/2019 HTML 5 Reference

    2/86

    This document was produced by a group operating under the 5 February 2004W3C Patent Policy. W3C maintains apublic list of any patent disclosures made inconnection with the deliverables of the group; that page also includesinstructions for disclosing a patent. An individual who has actual knowledge of apatent which the individual believes contains Essential Claim(s) must disclose the

    information in accordance with section 6 of the W3C Patent Policy.

    Table of contents

    1. 1 Introduction2. 2 Getting Started with HTML 5

    1. 2.1 A Basic Document2. 2.2 Understanding Semantics

    3. 3 The HTML and XHTML Syntax1. 3.1 Syntactic Overview2.

    3.2 The Syntax1. 3.2.1 DOCTYPE Declaration1. 3.2.1.1 Historical Notes

    2. 3.2.2 Elements3. 3.2.3 Attributes

    1. 3.2.3.1 Empty Attributes2. 3.2.3.2 Unquoted Attribute Values3. 3.2.3.3 Double-Quoted Attribute Values4. 3.2.3.4 Single-Quoted Attribute Values

    4. 3.2.4 Comments5. 3.2.5 Text

    6. 3.2.6 CDATA Sections7. 3.2.7 Character References

    3. 3.3 Understanding MIME Types4. 3.4 Character Encoding5. 3.5 Choosing HTML or XHTML6. 3.6 Polyglot Documents

    4. 4 The HTML Vocabulary and APIs1. 4.1 Categories

    1. 4.1.1 Metadata Content2. 4.1.2 Flow content3. 4.1.3 Sectioning root

    4. 4.1.4 Sectioning content5. 4.1.5 Heading content6. 4.1.6 Phrasing content7. 4.1.7 Embedded content8. 4.1.8 Interactive content9. 4.1.9 Transparent Content Models

    2. 4.2 Global Attributes3. 4.3 The Elements

    1. 4.3.1 The Root Element1. 4.3.1.1 The html element

    2. 4.3.2 Document Metadata1. 4.3.2.1 The head element

    2. 4.3.2.2 The title element

    http://www.w3.org/Consortium/Patent-Policy-20040205/http://www.w3.org/Consortium/Patent-Policy-20040205/http://www.w3.org/2004/01/pp-impl/40318/statushttp://www.w3.org/Consortium/Patent-Policy-20040205/#def-essentialhttp://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosurehttp://dev.w3.org/html5/html-author/#introductionhttp://dev.w3.org/html5/html-author/#introductionhttp://dev.w3.org/html5/html-author/#introductionhttp://dev.w3.org/html5/html-author/#getting-started-with-html-5http://dev.w3.org/html5/html-author/#getting-started-with-html-5http://dev.w3.org/html5/html-author/#getting-started-with-html-5http://dev.w3.org/html5/html-author/#a-basic-documenthttp://dev.w3.org/html5/html-author/#a-basic-documenthttp://dev.w3.org/html5/html-author/#a-basic-documenthttp://dev.w3.org/html5/html-author/#understanding-semanticshttp://dev.w3.org/html5/html-author/#understanding-semanticshttp://dev.w3.org/html5/html-author/#understanding-semanticshttp://dev.w3.org/html5/html-author/#the-html-and-xhtml-syntaxhttp://dev.w3.org/html5/html-author/#the-html-and-xhtml-syntaxhttp://dev.w3.org/html5/html-author/#the-html-and-xhtml-syntaxhttp://dev.w3.org/html5/html-author/#syntactic-overviewhttp://dev.w3.org/html5/html-author/#syntactic-overviewhttp://dev.w3.org/html5/html-author/#syntactic-overviewhttp://dev.w3.org/html5/html-author/#the-syntaxhttp://dev.w3.org/html5/html-author/#the-syntaxhttp://dev.w3.org/html5/html-author/#the-syntaxhttp://dev.w3.org/html5/html-author/#doctype-declarationhttp://dev.w3.org/html5/html-author/#doctype-declarationhttp://dev.w3.org/html5/html-author/#doctype-declarationhttp://dev.w3.org/html5/html-author/#historical-noteshttp://dev.w3.org/html5/html-author/#historical-noteshttp://dev.w3.org/html5/html-author/#historical-noteshttp://dev.w3.org/html5/html-author/#elementshttp://dev.w3.org/html5/html-author/#elementshttp://dev.w3.org/html5/html-author/#elementshttp://dev.w3.org/html5/html-author/#attributeshttp://dev.w3.org/html5/html-author/#attributeshttp://dev.w3.org/html5/html-author/#attributeshttp://dev.w3.org/html5/html-author/#empty-attrhttp://dev.w3.org/html5/html-author/#empty-attrhttp://dev.w3.org/html5/html-author/#empty-attrhttp://dev.w3.org/html5/html-author/#unquoted-attrhttp://dev.w3.org/html5/html-author/#unquoted-attrhttp://dev.w3.org/html5/html-author/#unquoted-attrhttp://dev.w3.org/html5/html-author/#double-quote-attrhttp://dev.w3.org/html5/html-author/#double-quote-attrhttp://dev.w3.org/html5/html-author/#double-quote-attrhttp://dev.w3.org/html5/html-author/#single-quote-attrhttp://dev.w3.org/html5/html-author/#single-quote-attrhttp://dev.w3.org/html5/html-author/#single-quote-attrhttp://dev.w3.org/html5/html-author/#commentshttp://dev.w3.org/html5/html-author/#commentshttp://dev.w3.org/html5/html-author/#commentshttp://dev.w3.org/html5/html-author/#texthttp://dev.w3.org/html5/html-author/#texthttp://dev.w3.org/html5/html-author/#texthttp://dev.w3.org/html5/html-author/#cdata-sectionshttp://dev.w3.org/html5/html-author/#cdata-sectionshttp://dev.w3.org/html5/html-author/#cdata-sectionshttp://dev.w3.org/html5/html-author/#character-referenceshttp://dev.w3.org/html5/html-author/#character-referenceshttp://dev.w3.org/html5/html-author/#character-referenceshttp://dev.w3.org/html5/html-author/#understanding-mime-typeshttp://dev.w3.org/html5/html-author/#understanding-mime-typeshttp://dev.w3.org/html5/html-author/#understanding-mime-typeshttp://dev.w3.org/html5/html-author/#character-encodinghttp://dev.w3.org/html5/html-author/#character-encodinghttp://dev.w3.org/html5/html-author/#character-encodinghttp://dev.w3.org/html5/html-author/#choosing-html-or-xhtmlhttp://dev.w3.org/html5/html-author/#choosing-html-or-xhtmlhttp://dev.w3.org/html5/html-author/#choosing-html-or-xhtmlhttp://dev.w3.org/html5/html-author/#polyglot-documentshttp://dev.w3.org/html5/html-author/#polyglot-documentshttp://dev.w3.org/html5/html-author/#polyglot-documentshttp://dev.w3.org/html5/html-author/#the-html-vocabulary-and-apishttp://dev.w3.org/html5/html-author/#the-html-vocabulary-and-apishttp://dev.w3.org/html5/html-author/#the-html-vocabulary-and-apishttp://dev.w3.org/html5/html-author/#categorieshttp://dev.w3.org/html5/html-author/#categorieshttp://dev.w3.org/html5/html-author/#categorieshttp://dev.w3.org/html5/html-author/#metadata-contenthttp://dev.w3.org/html5/html-author/#metadata-contenthttp://dev.w3.org/html5/html-author/#metadata-contenthttp://dev.w3.org/html5/html-author/#flow-contenthttp://dev.w3.org/html5/html-author/#flow-contenthttp://dev.w3.org/html5/html-author/#flow-contenthttp://dev.w3.org/html5/html-author/#sectioning-roothttp://dev.w3.org/html5/html-author/#sectioning-roothttp://dev.w3.org/html5/html-author/#sectioning-roothttp://dev.w3.org/html5/html-author/#sectioning-contenthttp://dev.w3.org/html5/html-author/#sectioning-contenthttp://dev.w3.org/html5/html-author/#sectioning-contenthttp://dev.w3.org/html5/html-author/#heading-contenthttp://dev.w3.org/html5/html-author/#heading-contenthttp://dev.w3.org/html5/html-author/#heading-contenthttp://dev.w3.org/html5/html-author/#phrasing-contenthttp://dev.w3.org/html5/html-author/#phrasing-contenthttp://dev.w3.org/html5/html-author/#phrasing-contenthttp://dev.w3.org/html5/html-author/#embedded-contenthttp://dev.w3.org/html5/html-author/#embedded-contenthttp://dev.w3.org/html5/html-author/#embedded-contenthttp://dev.w3.org/html5/html-author/#interactive-contenthttp://dev.w3.org/html5/html-author/#interactive-contenthttp://dev.w3.org/html5/html-author/#interactive-contenthttp://dev.w3.org/html5/html-author/#transparent-content-modelshttp://dev.w3.org/html5/html-author/#transparent-content-modelshttp://dev.w3.org/html5/html-author/#transparent-content-modelshttp://dev.w3.org/html5/html-author/#global-attributeshttp://dev.w3.org/html5/html-author/#global-attributeshttp://dev.w3.org/html5/html-author/#global-attributeshttp://dev.w3.org/html5/html-author/#the-elementshttp://dev.w3.org/html5/html-author/#the-elementshttp://dev.w3.org/html5/html-author/#the-elementshttp://dev.w3.org/html5/html-author/#the-root-elementhttp://dev.w3.org/html5/html-author/#the-root-elementhttp://dev.w3.org/html5/html-author/#the-root-elementhttp://dev.w3.org/html5/html-author/#the-html-elementhttp://dev.w3.org/html5/html-author/#the-html-elementhttp://dev.w3.org/html5/html-author/#the-html-elementhttp://dev.w3.org/html5/html-author/#the-html-elementhttp://dev.w3.org/html5/html-author/#the-html-elementhttp://dev.w3.org/html5/html-author/#the-html-elementhttp://dev.w3.org/html5/html-author/#document-metadatahttp://dev.w3.org/html5/html-author/#document-metadatahttp://dev.w3.org/html5/html-author/#document-metadatahttp://dev.w3.org/html5/html-author/#the-head-elementhttp://dev.w3.org/html5/html-author/#the-head-elementhttp://dev.w3.org/html5/html-author/#the-head-elementhttp://dev.w3.org/html5/html-author/#the-head-elementhttp://dev.w3.org/html5/html-author/#the-head-elementhttp://dev.w3.org/html5/html-author/#the-head-elementhttp://dev.w3.org/html5/html-author/#the-title-elementhttp://dev.w3.org/html5/html-author/#the-title-elementhttp://dev.w3.org/html5/html-author/#the-title-elementhttp://dev.w3.org/html5/html-author/#the-title-elementhttp://dev.w3.org/html5/html-author/#the-title-elementhttp://dev.w3.org/html5/html-author/#the-title-elementhttp://www.w3.org/Consortium/Patent-Policy-20040205/http://www.w3.org/Consortium/Patent-Policy-20040205/http://www.w3.org/2004/01/pp-impl/40318/statushttp://www.w3.org/Consortium/Patent-Policy-20040205/#def-essentialhttp://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosurehttp://dev.w3.org/html5/html-author/#introductionhttp://dev.w3.org/html5/html-author/#getting-started-with-html-5http://dev.w3.org/html5/html-author/#a-basic-documenthttp://dev.w3.org/html5/html-author/#understanding-semanticshttp://dev.w3.org/html5/html-author/#the-html-and-xhtml-syntaxhttp://dev.w3.org/html5/html-author/#syntactic-overviewhttp://dev.w3.org/html5/html-author/#the-syntaxhttp://dev.w3.org/html5/html-author/#doctype-declarationhttp://dev.w3.org/html5/html-author/#historical-noteshttp://dev.w3.org/html5/html-author/#elementshttp://dev.w3.org/html5/html-author/#attributeshttp://dev.w3.org/html5/html-author/#empty-attrhttp://dev.w3.org/html5/html-author/#unquoted-attrhttp://dev.w3.org/html5/html-author/#double-quote-attrhttp://dev.w3.org/html5/html-author/#single-quote-attrhttp://dev.w3.org/html5/html-author/#commentshttp://dev.w3.org/html5/html-author/#texthttp://dev.w3.org/html5/html-author/#cdata-sectionshttp://dev.w3.org/html5/html-author/#character-referenceshttp://dev.w3.org/html5/html-author/#understanding-mime-typeshttp://dev.w3.org/html5/html-author/#character-encodinghttp://dev.w3.org/html5/html-author/#choosing-html-or-xhtmlhttp://dev.w3.org/html5/html-author/#polyglot-documentshttp://dev.w3.org/html5/html-author/#the-html-vocabulary-and-apishttp://dev.w3.org/html5/html-author/#categorieshttp://dev.w3.org/html5/html-author/#metadata-contenthttp://dev.w3.org/html5/html-author/#flow-contenthttp://dev.w3.org/html5/html-author/#sectioning-roothttp://dev.w3.org/html5/html-author/#sectioning-contenthttp://dev.w3.org/html5/html-author/#heading-contenthttp://dev.w3.org/html5/html-author/#phrasing-contenthttp://dev.w3.org/html5/html-author/#embedded-contenthttp://dev.w3.org/html5/html-author/#interactive-contenthttp://dev.w3.org/html5/html-author/#transparent-content-modelshttp://dev.w3.org/html5/html-author/#global-attributeshttp://dev.w3.org/html5/html-author/#the-elementshttp://dev.w3.org/html5/html-author/#the-root-elementhttp://dev.w3.org/html5/html-author/#the-html-elementhttp://dev.w3.org/html5/html-author/#document-metadatahttp://dev.w3.org/html5/html-author/#the-head-elementhttp://dev.w3.org/html5/html-author/#the-title-element
  • 8/8/2019 HTML 5 Reference

    3/86

    3. 4.3.2.3 The base element

    4. 4.3.2.4 The link element

    5. 4.3.2.5 The meta element

    6. 4.3.2.6 The style element

    3. 4.3.3 Scripting

    1. 4.3.3.1 The script element2. 4.3.3.2 The noscript element

    4. 4.3.4 Sections1. 4.3.4.1 The body element

    2. 4.3.4.2 The section element

    3. 4.3.4.3 The nav element

    4. 4.3.4.4 The article element

    5. 4.3.4.5 The aside element

    6. 4.3.4.6 The h1, h2, h3, h4, h5, and h6 elements

    7. 4.3.4.7 The header element

    8.

    4.3.4.8 Thefooter

    element9. 4.3.4.9 The address element

    5. 4.3.5 Grouping Content1. 4.3.5.1 The p element

    2. 4.3.5.2 The hr element

    3. 4.3.5.3 The br element

    4. 4.3.5.4 The pre element

    5. 4.3.5.5 The dialog element

    6. 4.3.5.6 The blockquote element

    7. 4.3.5.7 The ol element

    8. 4.3.5.8 The ul element

    9. 4.3.5.9 The li element10.4.3.5.10 The dl element

    11.4.3.5.11 The dt element

    12.4.3.5.12 The dd element

    6. 4.3.6 Text-Level Semantics1. 4.3.6.1 The a element

    2. 4.3.6.2 The q element

    3. 4.3.6.3 The cite element

    4. 4.3.6.4 The em element

    5. 4.3.6.5 The strong element

    6.4.3.6.6 The small element

    7. 4.3.6.7 The mark element

    8. 4.3.6.8 The dfn element

    9. 4.3.6.9 The abbr element

    10.4.3.6.10 The time element

    11.4.3.6.11 The progress element

    12.4.3.6.12 The meter element

    13.4.3.6.13 The code element

    14.4.3.6.14 The var element

    15.4.3.6.15 The samp element

    16.4.3.6.16 The kbd element

    17.4.3.6.17 The sub and sup elements18.4.3.6.18 The span element

    http://dev.w3.org/html5/html-author/#the-base-elementhttp://dev.w3.org/html5/html-author/#the-base-elementhttp://dev.w3.org/html5/html-author/#the-base-elementhttp://dev.w3.org/html5/html-author/#the-base-elementhttp://dev.w3.org/html5/html-author/#the-base-elementhttp://dev.w3.org/html5/html-author/#the-base-elementhttp://dev.w3.org/html5/html-author/#the-link-elementhttp://dev.w3.org/html5/html-author/#the-link-elementhttp://dev.w3.org/html5/html-author/#the-link-elementhttp://dev.w3.org/html5/html-author/#the-link-elementhttp://dev.w3.org/html5/html-author/#the-link-elementhttp://dev.w3.org/html5/html-author/#the-link-elementhttp://dev.w3.org/html5/html-author/#the-meta-elementhttp://dev.w3.org/html5/html-author/#the-meta-elementhttp://dev.w3.org/html5/html-author/#the-meta-elementhttp://dev.w3.org/html5/html-author/#the-meta-elementhttp://dev.w3.org/html5/html-author/#the-meta-elementhttp://dev.w3.org/html5/html-author/#the-meta-elementhttp://dev.w3.org/html5/html-author/#the-style-elementhttp://dev.w3.org/html5/html-author/#the-style-elementhttp://dev.w3.org/html5/html-author/#the-style-elementhttp://dev.w3.org/html5/html-author/#the-style-elementhttp://dev.w3.org/html5/html-author/#the-style-elementhttp://dev.w3.org/html5/html-author/#the-style-elementhttp://dev.w3.org/html5/html-author/#scriptinghttp://dev.w3.org/html5/html-author/#scriptinghttp://dev.w3.org/html5/html-author/#scriptinghttp://dev.w3.org/html5/html-author/#the-script-elementhttp://dev.w3.org/html5/html-author/#the-script-elementhttp://dev.w3.org/html5/html-author/#the-script-elementhttp://dev.w3.org/html5/html-author/#the-script-elementhttp://dev.w3.org/html5/html-author/#the-script-elementhttp://dev.w3.org/html5/html-author/#the-script-elementhttp://dev.w3.org/html5/html-author/#the-noscript-elementhttp://dev.w3.org/html5/html-author/#the-noscript-elementhttp://dev.w3.org/html5/html-author/#the-noscript-elementhttp://dev.w3.org/html5/html-author/#the-noscript-elementhttp://dev.w3.org/html5/html-author/#the-noscript-elementhttp://dev.w3.org/html5/html-author/#the-noscript-elementhttp://dev.w3.org/html5/html-author/#sectionshttp://dev.w3.org/html5/html-author/#sectionshttp://dev.w3.org/html5/html-author/#sectionshttp://dev.w3.org/html5/html-author/#the-body-elementhttp://dev.w3.org/html5/html-author/#the-body-elementhttp://dev.w3.org/html5/html-author/#the-body-elementhttp://dev.w3.org/html5/html-author/#the-body-elementhttp://dev.w3.org/html5/html-author/#the-body-elementhttp://dev.w3.org/html5/html-author/#the-body-elementhttp://dev.w3.org/html5/html-author/#the-section-elementhttp://dev.w3.org/html5/html-author/#the-section-elementhttp://dev.w3.org/html5/html-author/#the-section-elementhttp://dev.w3.org/html5/html-author/#the-section-elementhttp://dev.w3.org/html5/html-author/#the-section-elementhttp://dev.w3.org/html5/html-author/#the-section-elementhttp://dev.w3.org/html5/html-author/#the-nav-elementhttp://dev.w3.org/html5/html-author/#the-nav-elementhttp://dev.w3.org/html5/html-author/#the-nav-elementhttp://dev.w3.org/html5/html-author/#the-nav-elementhttp://dev.w3.org/html5/html-author/#the-nav-elementhttp://dev.w3.org/html5/html-author/#the-nav-elementhttp://dev.w3.org/html5/html-author/#the-article-elementhttp://dev.w3.org/html5/html-author/#the-article-elementhttp://dev.w3.org/html5/html-author/#the-article-elementhttp://dev.w3.org/html5/html-author/#the-article-elementhttp://dev.w3.org/html5/html-author/#the-article-elementhttp://dev.w3.org/html5/html-author/#the-article-elementhttp://dev.w3.org/html5/html-author/#the-aside-elementhttp://dev.w3.org/html5/html-author/#the-aside-elementhttp://dev.w3.org/html5/html-author/#the-aside-elementhttp://dev.w3.org/html5/html-author/#the-aside-elementhttp://dev.w3.org/html5/html-author/#the-aside-elementhttp://dev.w3.org/html5/html-author/#the-aside-elementhttp://dev.w3.org/html5/html-author/#the-h1,-h2,-h3,-h4,-h5,-and-h6-elementshttp://dev.w3.org/html5/html-author/#the-h1,-h2,-h3,-h4,-h5,-and-h6-elementshttp://dev.w3.org/html5/html-author/#the-h1,-h2,-h3,-h4,-h5,-and-h6-elementshttp://dev.w3.org/html5/html-author/#the-h1,-h2,-h3,-h4,-h5,-and-h6-elementshttp://dev.w3.org/html5/html-author/#the-h1,-h2,-h3,-h4,-h5,-and-h6-elementshttp://dev.w3.org/html5/html-author/#the-h1,-h2,-h3,-h4,-h5,-and-h6-elementshttp://dev.w3.org/html5/html-author/#the-h1,-h2,-h3,-h4,-h5,-and-h6-elementshttp://dev.w3.org/html5/html-author/#the-h1,-h2,-h3,-h4,-h5,-and-h6-elementshttp://dev.w3.org/html5/html-author/#the-h1,-h2,-h3,-h4,-h5,-and-h6-elementshttp://dev.w3.org/html5/html-author/#the-h1,-h2,-h3,-h4,-h5,-and-h6-elementshttp://dev.w3.org/html5/html-author/#the-h1,-h2,-h3,-h4,-h5,-and-h6-elementshttp://dev.w3.org/html5/html-author/#the-h1,-h2,-h3,-h4,-h5,-and-h6-elementshttp://dev.w3.org/html5/html-author/#the-h1,-h2,-h3,-h4,-h5,-and-h6-elementshttp://dev.w3.org/html5/html-author/#the-h1,-h2,-h3,-h4,-h5,-and-h6-elementshttp://dev.w3.org/html5/html-author/#the-h1,-h2,-h3,-h4,-h5,-and-h6-elementshttp://dev.w3.org/html5/html-author/#the-h1,-h2,-h3,-h4,-h5,-and-h6-elementshttp://dev.w3.org/html5/html-author/#the-h1,-h2,-h3,-h4,-h5,-and-h6-elementshttp://dev.w3.org/html5/html-author/#the-h1,-h2,-h3,-h4,-h5,-and-h6-elementshttp://dev.w3.org/html5/html-author/#the-h1,-h2,-h3,-h4,-h5,-and-h6-elementshttp://dev.w3.org/html5/html-author/#the-h1,-h2,-h3,-h4,-h5,-and-h6-elementshttp://dev.w3.org/html5/html-author/#the-h1,-h2,-h3,-h4,-h5,-and-h6-elementshttp://dev.w3.org/html5/html-author/#the-header-elementhttp://dev.w3.org/html5/html-author/#the-header-elementhttp://dev.w3.org/html5/html-author/#the-header-elementhttp://dev.w3.org/html5/html-author/#the-header-elementhttp://dev.w3.org/html5/html-author/#the-header-elementhttp://dev.w3.org/html5/html-author/#the-header-elementhttp://dev.w3.org/html5/html-author/#the-footer-elementhttp://dev.w3.org/html5/html-author/#the-footer-elementhttp://dev.w3.org/html5/html-author/#the-footer-elementhttp://dev.w3.org/html5/html-author/#the-footer-elementhttp://dev.w3.org/html5/html-author/#the-footer-elementhttp://dev.w3.org/html5/html-author/#the-footer-elementhttp://dev.w3.org/html5/html-author/#the-address-elementhttp://dev.w3.org/html5/html-author/#the-address-elementhttp://dev.w3.org/html5/html-author/#the-address-elementhttp://dev.w3.org/html5/html-author/#the-address-elementhttp://dev.w3.org/html5/html-author/#the-address-elementhttp://dev.w3.org/html5/html-author/#the-address-elementhttp://dev.w3.org/html5/html-author/#grouping-contenthttp://dev.w3.org/html5/html-author/#grouping-contenthttp://dev.w3.org/html5/html-author/#grouping-contenthttp://dev.w3.org/html5/html-author/#the-p-elementhttp://dev.w3.org/html5/html-author/#the-p-elementhttp://dev.w3.org/html5/html-author/#the-p-elementhttp://dev.w3.org/html5/html-author/#the-p-elementhttp://dev.w3.org/html5/html-author/#the-p-elementhttp://dev.w3.org/html5/html-author/#the-p-elementhttp://dev.w3.org/html5/html-author/#the-hr-elementhttp://dev.w3.org/html5/html-author/#the-hr-elementhttp://dev.w3.org/html5/html-author/#the-hr-elementhttp://dev.w3.org/html5/html-author/#the-hr-elementhttp://dev.w3.org/html5/html-author/#the-hr-elementhttp://dev.w3.org/html5/html-author/#the-hr-elementhttp://dev.w3.org/html5/html-author/#the-br-elementhttp://dev.w3.org/html5/html-author/#the-br-elementhttp://dev.w3.org/html5/html-author/#the-br-elementhttp://dev.w3.org/html5/html-author/#the-br-elementhttp://dev.w3.org/html5/html-author/#the-br-elementhttp://dev.w3.org/html5/html-author/#the-br-elementhttp://dev.w3.org/html5/html-author/#the-pre-elementhttp://dev.w3.org/html5/html-author/#the-pre-elementhttp://dev.w3.org/html5/html-author/#the-pre-elementhttp://dev.w3.org/html5/html-author/#the-pre-elementhttp://dev.w3.org/html5/html-author/#the-pre-elementhttp://dev.w3.org/html5/html-author/#the-pre-elementhttp://dev.w3.org/html5/html-author/#the-dialog-elementhttp://dev.w3.org/html5/html-author/#the-dialog-elementhttp://dev.w3.org/html5/html-author/#the-dialog-elementhttp://dev.w3.org/html5/html-author/#the-dialog-elementhttp://dev.w3.org/html5/html-author/#the-dialog-elementhttp://dev.w3.org/html5/html-author/#the-dialog-elementhttp://dev.w3.org/html5/html-author/#the-blockquote-elementhttp://dev.w3.org/html5/html-author/#the-blockquote-elementhttp://dev.w3.org/html5/html-author/#the-blockquote-elementhttp://dev.w3.org/html5/html-author/#the-blockquote-elementhttp://dev.w3.org/html5/html-author/#the-blockquote-elementhttp://dev.w3.org/html5/html-author/#the-blockquote-elementhttp://dev.w3.org/html5/html-author/#the-ol-elementhttp://dev.w3.org/html5/html-author/#the-ol-elementhttp://dev.w3.org/html5/html-author/#the-ol-elementhttp://dev.w3.org/html5/html-author/#the-ol-elementhttp://dev.w3.org/html5/html-author/#the-ol-elementhttp://dev.w3.org/html5/html-author/#the-ol-elementhttp://dev.w3.org/html5/html-author/#the-ul-elementhttp://dev.w3.org/html5/html-author/#the-ul-elementhttp://dev.w3.org/html5/html-author/#the-ul-elementhttp://dev.w3.org/html5/html-author/#the-ul-elementhttp://dev.w3.org/html5/html-author/#the-ul-elementhttp://dev.w3.org/html5/html-author/#the-ul-elementhttp://dev.w3.org/html5/html-author/#the-li-elementhttp://dev.w3.org/html5/html-author/#the-li-elementhttp://dev.w3.org/html5/html-author/#the-li-elementhttp://dev.w3.org/html5/html-author/#the-li-elementhttp://dev.w3.org/html5/html-author/#the-li-elementhttp://dev.w3.org/html5/html-author/#the-li-elementhttp://dev.w3.org/html5/html-author/#the-dl-elementhttp://dev.w3.org/html5/html-author/#the-dl-elementhttp://dev.w3.org/html5/html-author/#the-dl-elementhttp://dev.w3.org/html5/html-author/#the-dl-elementhttp://dev.w3.org/html5/html-author/#the-dl-elementhttp://dev.w3.org/html5/html-author/#the-dl-elementhttp://dev.w3.org/html5/html-author/#the-dt-elementhttp://dev.w3.org/html5/html-author/#the-dt-elementhttp://dev.w3.org/html5/html-author/#the-dt-elementhttp://dev.w3.org/html5/html-author/#the-dt-elementhttp://dev.w3.org/html5/html-author/#the-dt-elementhttp://dev.w3.org/html5/html-author/#the-dt-elementhttp://dev.w3.org/html5/html-author/#the-dd-elementhttp://dev.w3.org/html5/html-author/#the-dd-elementhttp://dev.w3.org/html5/html-author/#the-dd-elementhttp://dev.w3.org/html5/html-author/#the-dd-elementhttp://dev.w3.org/html5/html-author/#the-dd-elementhttp://dev.w3.org/html5/html-author/#the-dd-elementhttp://dev.w3.org/html5/html-author/#text-level-semanticshttp://dev.w3.org/html5/html-author/#text-level-semanticshttp://dev.w3.org/html5/html-author/#text-level-semanticshttp://dev.w3.org/html5/html-author/#the-a-elementhttp://dev.w3.org/html5/html-author/#the-a-elementhttp://dev.w3.org/html5/html-author/#the-a-elementhttp://dev.w3.org/html5/html-author/#the-a-elementhttp://dev.w3.org/html5/html-author/#the-a-elementhttp://dev.w3.org/html5/html-author/#the-a-elementhttp://dev.w3.org/html5/html-author/#the-q-elementhttp://dev.w3.org/html5/html-author/#the-q-elementhttp://dev.w3.org/html5/html-author/#the-q-elementhttp://dev.w3.org/html5/html-author/#the-q-elementhttp://dev.w3.org/html5/html-author/#the-q-elementhttp://dev.w3.org/html5/html-author/#the-q-elementhttp://dev.w3.org/html5/html-author/#the-cite-elementhttp://dev.w3.org/html5/html-author/#the-cite-elementhttp://dev.w3.org/html5/html-author/#the-cite-elementhttp://dev.w3.org/html5/html-author/#the-cite-elementhttp://dev.w3.org/html5/html-author/#the-cite-elementhttp://dev.w3.org/html5/html-author/#the-cite-elementhttp://dev.w3.org/html5/html-author/#the-em-elementhttp://dev.w3.org/html5/html-author/#the-em-elementhttp://dev.w3.org/html5/html-author/#the-em-elementhttp://dev.w3.org/html5/html-author/#the-em-elementhttp://dev.w3.org/html5/html-author/#the-em-elementhttp://dev.w3.org/html5/html-author/#the-em-elementhttp://dev.w3.org/html5/html-author/#the-strong-elementhttp://dev.w3.org/html5/html-author/#the-strong-elementhttp://dev.w3.org/html5/html-author/#the-strong-elementhttp://dev.w3.org/html5/html-author/#the-strong-elementhttp://dev.w3.org/html5/html-author/#the-strong-elementhttp://dev.w3.org/html5/html-author/#the-strong-elementhttp://dev.w3.org/html5/html-author/#the-small-elementhttp://dev.w3.org/html5/html-author/#the-small-elementhttp://dev.w3.org/html5/html-author/#the-small-elementhttp://dev.w3.org/html5/html-author/#the-small-elementhttp://dev.w3.org/html5/html-author/#the-small-elementhttp://dev.w3.org/html5/html-author/#the-small-elementhttp://dev.w3.org/html5/html-author/#the-mark-elementhttp://dev.w3.org/html5/html-author/#the-mark-elementhttp://dev.w3.org/html5/html-author/#the-mark-elementhttp://dev.w3.org/html5/html-author/#the-mark-elementhttp://dev.w3.org/html5/html-author/#the-mark-elementhttp://dev.w3.org/html5/html-author/#the-mark-elementhttp://dev.w3.org/html5/html-author/#the-dfn-elementhttp://dev.w3.org/html5/html-author/#the-dfn-elementhttp://dev.w3.org/html5/html-author/#the-dfn-elementhttp://dev.w3.org/html5/html-author/#the-dfn-elementhttp://dev.w3.org/html5/html-author/#the-dfn-elementhttp://dev.w3.org/html5/html-author/#the-dfn-elementhttp://dev.w3.org/html5/html-author/#the-abbr-elementhttp://dev.w3.org/html5/html-author/#the-abbr-elementhttp://dev.w3.org/html5/html-author/#the-abbr-elementhttp://dev.w3.org/html5/html-author/#the-abbr-elementhttp://dev.w3.org/html5/html-author/#the-abbr-elementhttp://dev.w3.org/html5/html-author/#the-abbr-elementhttp://dev.w3.org/html5/html-author/#the-time-elementhttp://dev.w3.org/html5/html-author/#the-time-elementhttp://dev.w3.org/html5/html-author/#the-time-elementhttp://dev.w3.org/html5/html-author/#the-time-elementhttp://dev.w3.org/html5/html-author/#the-time-elementhttp://dev.w3.org/html5/html-author/#the-time-elementhttp://dev.w3.org/html5/html-author/#the-progress-elementhttp://dev.w3.org/html5/html-author/#the-progress-elementhttp://dev.w3.org/html5/html-author/#the-progress-elementhttp://dev.w3.org/html5/html-author/#the-progress-elementhttp://dev.w3.org/html5/html-author/#the-progress-elementhttp://dev.w3.org/html5/html-author/#the-progress-elementhttp://dev.w3.org/html5/html-author/#the-meter-elementhttp://dev.w3.org/html5/html-author/#the-meter-elementhttp://dev.w3.org/html5/html-author/#the-meter-elementhttp://dev.w3.org/html5/html-author/#the-meter-elementhttp://dev.w3.org/html5/html-author/#the-meter-elementhttp://dev.w3.org/html5/html-author/#the-meter-elementhttp://dev.w3.org/html5/html-author/#the-code-elementhttp://dev.w3.org/html5/html-author/#the-code-elementhttp://dev.w3.org/html5/html-author/#the-code-elementhttp://dev.w3.org/html5/html-author/#the-code-elementhttp://dev.w3.org/html5/html-author/#the-code-elementhttp://dev.w3.org/html5/html-author/#the-code-elementhttp://dev.w3.org/html5/html-author/#the-var-elementhttp://dev.w3.org/html5/html-author/#the-var-elementhttp://dev.w3.org/html5/html-author/#the-var-elementhttp://dev.w3.org/html5/html-author/#the-var-elementhttp://dev.w3.org/html5/html-author/#the-var-elementhttp://dev.w3.org/html5/html-author/#the-var-elementhttp://dev.w3.org/html5/html-author/#the-samp-elementhttp://dev.w3.org/html5/html-author/#the-samp-elementhttp://dev.w3.org/html5/html-author/#the-samp-elementhttp://dev.w3.org/html5/html-author/#the-samp-elementhttp://dev.w3.org/html5/html-author/#the-samp-elementhttp://dev.w3.org/html5/html-author/#the-samp-elementhttp://dev.w3.org/html5/html-author/#the-kbd-elementhttp://dev.w3.org/html5/html-author/#the-kbd-elementhttp://dev.w3.org/html5/html-author/#the-kbd-elementhttp://dev.w3.org/html5/html-author/#the-kbd-elementhttp://dev.w3.org/html5/html-author/#the-kbd-elementhttp://dev.w3.org/html5/html-author/#the-kbd-elementhttp://dev.w3.org/html5/html-author/#the-sub-and-sup-elementshttp://dev.w3.org/html5/html-author/#the-sub-and-sup-elementshttp://dev.w3.org/html5/html-author/#the-sub-and-sup-elementshttp://dev.w3.org/html5/html-author/#the-sub-and-sup-elementshttp://dev.w3.org/html5/html-author/#the-sub-and-sup-elementshttp://dev.w3.org/html5/html-author/#the-sub-and-sup-elementshttp://dev.w3.org/html5/html-author/#the-sub-and-sup-elementshttp://dev.w3.org/html5/html-author/#the-sub-and-sup-elementshttp://dev.w3.org/html5/html-author/#the-sub-and-sup-elementshttp://dev.w3.org/html5/html-author/#the-span-elementhttp://dev.w3.org/html5/html-author/#the-span-elementhttp://dev.w3.org/html5/html-author/#the-span-elementhttp://dev.w3.org/html5/html-author/#the-span-elementhttp://dev.w3.org/html5/html-author/#the-span-elementhttp://dev.w3.org/html5/html-author/#the-span-elementhttp://dev.w3.org/html5/html-author/#the-base-elementhttp://dev.w3.org/html5/html-author/#the-link-elementhttp://dev.w3.org/html5/html-author/#the-meta-elementhttp://dev.w3.org/html5/html-author/#the-style-elementhttp://dev.w3.org/html5/html-author/#scriptinghttp://dev.w3.org/html5/html-author/#the-script-elementhttp://dev.w3.org/html5/html-author/#the-noscript-elementhttp://dev.w3.org/html5/html-author/#sectionshttp://dev.w3.org/html5/html-author/#the-body-elementhttp://dev.w3.org/html5/html-author/#the-section-elementhttp://dev.w3.org/html5/html-author/#the-nav-elementhttp://dev.w3.org/html5/html-author/#the-article-elementhttp://dev.w3.org/html5/html-author/#the-aside-elementhttp://dev.w3.org/html5/html-author/#the-h1,-h2,-h3,-h4,-h5,-and-h6-elementshttp://dev.w3.org/html5/html-author/#the-header-elementhttp://dev.w3.org/html5/html-author/#the-footer-elementhttp://dev.w3.org/html5/html-author/#the-address-elementhttp://dev.w3.org/html5/html-author/#grouping-contenthttp://dev.w3.org/html5/html-author/#the-p-elementhttp://dev.w3.org/html5/html-author/#the-hr-elementhttp://dev.w3.org/html5/html-author/#the-br-elementhttp://dev.w3.org/html5/html-author/#the-pre-elementhttp://dev.w3.org/html5/html-author/#the-dialog-elementhttp://dev.w3.org/html5/html-author/#the-blockquote-elementhttp://dev.w3.org/html5/html-author/#the-ol-elementhttp://dev.w3.org/html5/html-author/#the-ul-elementhttp://dev.w3.org/html5/html-author/#the-li-elementhttp://dev.w3.org/html5/html-author/#the-dl-elementhttp://dev.w3.org/html5/html-author/#the-dt-elementhttp://dev.w3.org/html5/html-author/#the-dd-elementhttp://dev.w3.org/html5/html-author/#text-level-semanticshttp://dev.w3.org/html5/html-author/#the-a-elementhttp://dev.w3.org/html5/html-author/#the-q-elementhttp://dev.w3.org/html5/html-author/#the-cite-elementhttp://dev.w3.org/html5/html-author/#the-em-elementhttp://dev.w3.org/html5/html-author/#the-strong-elementhttp://dev.w3.org/html5/html-author/#the-small-elementhttp://dev.w3.org/html5/html-author/#the-mark-elementhttp://dev.w3.org/html5/html-author/#the-dfn-elementhttp://dev.w3.org/html5/html-author/#the-abbr-elementhttp://dev.w3.org/html5/html-author/#the-time-elementhttp://dev.w3.org/html5/html-author/#the-progress-elementhttp://dev.w3.org/html5/html-author/#the-meter-elementhttp://dev.w3.org/html5/html-author/#the-code-elementhttp://dev.w3.org/html5/html-author/#the-var-elementhttp://dev.w3.org/html5/html-author/#the-samp-elementhttp://dev.w3.org/html5/html-author/#the-kbd-elementhttp://dev.w3.org/html5/html-author/#the-sub-and-sup-elementshttp://dev.w3.org/html5/html-author/#the-span-element
  • 8/8/2019 HTML 5 Reference

    4/86

    19.4.3.6.19 The i element

    20.4.3.6.20 The b element

    21.4.3.6.21 The bdo element

    22.4.3.6.22 The ruby element

    23.4.3.6.23 The rt element

    24.4.3.6.24 The rp element7. 4.3.7 Edits

    1. 4.3.7.1 The ins element

    2. 4.3.7.2 The del element

    8. 4.3.8 Embedded Content1. 4.3.8.1 The figure element

    2. 4.3.8.2 The img element

    3. 4.3.8.3 The iframe element

    4. 4.3.8.4 The embed element

    5. 4.3.8.5 The object element

    6.

    4.3.8.6 Theparam

    element7. 4.3.8.7 The video element

    8. 4.3.8.8 The audio element

    9. 4.3.8.9 The source element

    10.4.3.8.10 The canvas element

    11.4.3.8.11 The map element

    12.4.3.8.12 The area element

    9. 4.3.9 Tabular Data1. 4.3.9.1 The table element

    2. 4.3.9.2 The caption element

    3. 4.3.9.3 The colgroup element

    4. 4.3.9.4 The col element5. 4.3.9.5 The tbody element

    6. 4.3.9.6 The thead element

    7. 4.3.9.7 The tfoot element

    8. 4.3.9.8 The tr element

    9. 4.3.9.9 The td element

    10.4.3.9.10 The th element

    10.4.3.10 Forms1. 4.3.10.1 The form element

    2. 4.3.10.2 The fieldset element

    3.4.3.10.3 The label element

    4. 4.3.10.4 The input element

    5. 4.3.10.5 The button element

    6. 4.3.10.6 The select element

    7. 4.3.10.7 The datalist element

    8. 4.3.10.8 The optgroup element

    9. 4.3.10.9 The option element

    10.4.3.10.10 The textarea element

    11.4.3.10.11 The output element

    11.4.3.11 Interactive Elements1. 4.3.11.1 The details element

    2. 4.3.11.2 The command element3. 4.3.11.3 The bb element

    http://dev.w3.org/html5/html-author/#the-i-elementhttp://dev.w3.org/html5/html-author/#the-i-elementhttp://dev.w3.org/html5/html-author/#the-i-elementhttp://dev.w3.org/html5/html-author/#the-i-elementhttp://dev.w3.org/html5/html-author/#the-i-elementhttp://dev.w3.org/html5/html-author/#the-i-elementhttp://dev.w3.org/html5/html-author/#the-b-elementhttp://dev.w3.org/html5/html-author/#the-b-elementhttp://dev.w3.org/html5/html-author/#the-b-elementhttp://dev.w3.org/html5/html-author/#the-b-elementhttp://dev.w3.org/html5/html-author/#the-b-elementhttp://dev.w3.org/html5/html-author/#the-b-elementhttp://dev.w3.org/html5/html-author/#the-bdo-elementhttp://dev.w3.org/html5/html-author/#the-bdo-elementhttp://dev.w3.org/html5/html-author/#the-bdo-elementhttp://dev.w3.org/html5/html-author/#the-bdo-elementhttp://dev.w3.org/html5/html-author/#the-bdo-elementhttp://dev.w3.org/html5/html-author/#the-bdo-elementhttp://dev.w3.org/html5/html-author/#the-ruby-elementhttp://dev.w3.org/html5/html-author/#the-ruby-elementhttp://dev.w3.org/html5/html-author/#the-ruby-elementhttp://dev.w3.org/html5/html-author/#the-ruby-elementhttp://dev.w3.org/html5/html-author/#the-ruby-elementhttp://dev.w3.org/html5/html-author/#the-ruby-elementhttp://dev.w3.org/html5/html-author/#the-rt-elementhttp://dev.w3.org/html5/html-author/#the-rt-elementhttp://dev.w3.org/html5/html-author/#the-rt-elementhttp://dev.w3.org/html5/html-author/#the-rt-elementhttp://dev.w3.org/html5/html-author/#the-rt-elementhttp://dev.w3.org/html5/html-author/#the-rt-elementhttp://dev.w3.org/html5/html-author/#the-rp-elementhttp://dev.w3.org/html5/html-author/#the-rp-elementhttp://dev.w3.org/html5/html-author/#the-rp-elementhttp://dev.w3.org/html5/html-author/#the-rp-elementhttp://dev.w3.org/html5/html-author/#the-rp-elementhttp://dev.w3.org/html5/html-author/#the-rp-elementhttp://dev.w3.org/html5/html-author/#editshttp://dev.w3.org/html5/html-author/#editshttp://dev.w3.org/html5/html-author/#editshttp://dev.w3.org/html5/html-author/#the-ins-elementhttp://dev.w3.org/html5/html-author/#the-ins-elementhttp://dev.w3.org/html5/html-author/#the-ins-elementhttp://dev.w3.org/html5/html-author/#the-ins-elementhttp://dev.w3.org/html5/html-author/#the-ins-elementhttp://dev.w3.org/html5/html-author/#the-ins-elementhttp://dev.w3.org/html5/html-author/#the-del-elementhttp://dev.w3.org/html5/html-author/#the-del-elementhttp://dev.w3.org/html5/html-author/#the-del-elementhttp://dev.w3.org/html5/html-author/#the-del-elementhttp://dev.w3.org/html5/html-author/#the-del-elementhttp://dev.w3.org/html5/html-author/#the-del-elementhttp://dev.w3.org/html5/html-author/#embedded-content-0http://dev.w3.org/html5/html-author/#embedded-content-0http://dev.w3.org/html5/html-author/#embedded-content-0http://dev.w3.org/html5/html-author/#the-figure-elementhttp://dev.w3.org/html5/html-author/#the-figure-elementhttp://dev.w3.org/html5/html-author/#the-figure-elementhttp://dev.w3.org/html5/html-author/#the-figure-elementhttp://dev.w3.org/html5/html-author/#the-figure-elementhttp://dev.w3.org/html5/html-author/#the-figure-elementhttp://dev.w3.org/html5/html-author/#the-img-elementhttp://dev.w3.org/html5/html-author/#the-img-elementhttp://dev.w3.org/html5/html-author/#the-img-elementhttp://dev.w3.org/html5/html-author/#the-img-elementhttp://dev.w3.org/html5/html-author/#the-img-elementhttp://dev.w3.org/html5/html-author/#the-img-elementhttp://dev.w3.org/html5/html-author/#the-iframe-elementhttp://dev.w3.org/html5/html-author/#the-iframe-elementhttp://dev.w3.org/html5/html-author/#the-iframe-elementhttp://dev.w3.org/html5/html-author/#the-iframe-elementhttp://dev.w3.org/html5/html-author/#the-iframe-elementhttp://dev.w3.org/html5/html-author/#the-iframe-elementhttp://dev.w3.org/html5/html-author/#the-embed-elementhttp://dev.w3.org/html5/html-author/#the-embed-elementhttp://dev.w3.org/html5/html-author/#the-embed-elementhttp://dev.w3.org/html5/html-author/#the-embed-elementhttp://dev.w3.org/html5/html-author/#the-embed-elementhttp://dev.w3.org/html5/html-author/#the-embed-elementhttp://dev.w3.org/html5/html-author/#the-object-elementhttp://dev.w3.org/html5/html-author/#the-object-elementhttp://dev.w3.org/html5/html-author/#the-object-elementhttp://dev.w3.org/html5/html-author/#the-object-elementhttp://dev.w3.org/html5/html-author/#the-object-elementhttp://dev.w3.org/html5/html-author/#the-object-elementhttp://dev.w3.org/html5/html-author/#the-param-elementhttp://dev.w3.org/html5/html-author/#the-param-elementhttp://dev.w3.org/html5/html-author/#the-param-elementhttp://dev.w3.org/html5/html-author/#the-param-elementhttp://dev.w3.org/html5/html-author/#the-param-elementhttp://dev.w3.org/html5/html-author/#the-param-elementhttp://dev.w3.org/html5/html-author/#the-video-elementhttp://dev.w3.org/html5/html-author/#the-video-elementhttp://dev.w3.org/html5/html-author/#the-video-elementhttp://dev.w3.org/html5/html-author/#the-video-elementhttp://dev.w3.org/html5/html-author/#the-video-elementhttp://dev.w3.org/html5/html-author/#the-video-elementhttp://dev.w3.org/html5/html-author/#the-audio-elementhttp://dev.w3.org/html5/html-author/#the-audio-elementhttp://dev.w3.org/html5/html-author/#the-audio-elementhttp://dev.w3.org/html5/html-author/#the-audio-elementhttp://dev.w3.org/html5/html-author/#the-audio-elementhttp://dev.w3.org/html5/html-author/#the-audio-elementhttp://dev.w3.org/html5/html-author/#the-source-elementhttp://dev.w3.org/html5/html-author/#the-source-elementhttp://dev.w3.org/html5/html-author/#the-source-elementhttp://dev.w3.org/html5/html-author/#the-source-elementhttp://dev.w3.org/html5/html-author/#the-source-elementhttp://dev.w3.org/html5/html-author/#the-source-elementhttp://dev.w3.org/html5/html-author/#the-canvas-elementhttp://dev.w3.org/html5/html-author/#the-canvas-elementhttp://dev.w3.org/html5/html-author/#the-canvas-elementhttp://dev.w3.org/html5/html-author/#the-canvas-elementhttp://dev.w3.org/html5/html-author/#the-canvas-elementhttp://dev.w3.org/html5/html-author/#the-canvas-elementhttp://dev.w3.org/html5/html-author/#the-map-elementhttp://dev.w3.org/html5/html-author/#the-map-elementhttp://dev.w3.org/html5/html-author/#the-map-elementhttp://dev.w3.org/html5/html-author/#the-map-elementhttp://dev.w3.org/html5/html-author/#the-map-elementhttp://dev.w3.org/html5/html-author/#the-map-elementhttp://dev.w3.org/html5/html-author/#the-area-elementhttp://dev.w3.org/html5/html-author/#the-area-elementhttp://dev.w3.org/html5/html-author/#the-area-elementhttp://dev.w3.org/html5/html-author/#the-area-elementhttp://dev.w3.org/html5/html-author/#the-area-elementhttp://dev.w3.org/html5/html-author/#the-area-elementhttp://dev.w3.org/html5/html-author/#tabular-datahttp://dev.w3.org/html5/html-author/#tabular-datahttp://dev.w3.org/html5/html-author/#tabular-datahttp://dev.w3.org/html5/html-author/#the-table-elementhttp://dev.w3.org/html5/html-author/#the-table-elementhttp://dev.w3.org/html5/html-author/#the-table-elementhttp://dev.w3.org/html5/html-author/#the-table-elementhttp://dev.w3.org/html5/html-author/#the-table-elementhttp://dev.w3.org/html5/html-author/#the-table-elementhttp://dev.w3.org/html5/html-author/#the-caption-elementhttp://dev.w3.org/html5/html-author/#the-caption-elementhttp://dev.w3.org/html5/html-author/#the-caption-elementhttp://dev.w3.org/html5/html-author/#the-caption-elementhttp://dev.w3.org/html5/html-author/#the-caption-elementhttp://dev.w3.org/html5/html-author/#the-caption-elementhttp://dev.w3.org/html5/html-author/#the-colgroup-elementhttp://dev.w3.org/html5/html-author/#the-colgroup-elementhttp://dev.w3.org/html5/html-author/#the-colgroup-elementhttp://dev.w3.org/html5/html-author/#the-colgroup-elementhttp://dev.w3.org/html5/html-author/#the-colgroup-elementhttp://dev.w3.org/html5/html-author/#the-colgroup-elementhttp://dev.w3.org/html5/html-author/#the-col-elementhttp://dev.w3.org/html5/html-author/#the-col-elementhttp://dev.w3.org/html5/html-author/#the-col-elementhttp://dev.w3.org/html5/html-author/#the-col-elementhttp://dev.w3.org/html5/html-author/#the-col-elementhttp://dev.w3.org/html5/html-author/#the-col-elementhttp://dev.w3.org/html5/html-author/#the-tbody-elementhttp://dev.w3.org/html5/html-author/#the-tbody-elementhttp://dev.w3.org/html5/html-author/#the-tbody-elementhttp://dev.w3.org/html5/html-author/#the-tbody-elementhttp://dev.w3.org/html5/html-author/#the-tbody-elementhttp://dev.w3.org/html5/html-author/#the-tbody-elementhttp://dev.w3.org/html5/html-author/#the-thead-elementhttp://dev.w3.org/html5/html-author/#the-thead-elementhttp://dev.w3.org/html5/html-author/#the-thead-elementhttp://dev.w3.org/html5/html-author/#the-thead-elementhttp://dev.w3.org/html5/html-author/#the-thead-elementhttp://dev.w3.org/html5/html-author/#the-thead-elementhttp://dev.w3.org/html5/html-author/#the-tfoot-elementhttp://dev.w3.org/html5/html-author/#the-tfoot-elementhttp://dev.w3.org/html5/html-author/#the-tfoot-elementhttp://dev.w3.org/html5/html-author/#the-tfoot-elementhttp://dev.w3.org/html5/html-author/#the-tfoot-elementhttp://dev.w3.org/html5/html-author/#the-tfoot-elementhttp://dev.w3.org/html5/html-author/#the-tr-elementhttp://dev.w3.org/html5/html-author/#the-tr-elementhttp://dev.w3.org/html5/html-author/#the-tr-elementhttp://dev.w3.org/html5/html-author/#the-tr-elementhttp://dev.w3.org/html5/html-author/#the-tr-elementhttp://dev.w3.org/html5/html-author/#the-tr-elementhttp://dev.w3.org/html5/html-author/#the-td-elementhttp://dev.w3.org/html5/html-author/#the-td-elementhttp://dev.w3.org/html5/html-author/#the-td-elementhttp://dev.w3.org/html5/html-author/#the-td-elementhttp://dev.w3.org/html5/html-author/#the-td-elementhttp://dev.w3.org/html5/html-author/#the-td-elementhttp://dev.w3.org/html5/html-author/#the-th-elementhttp://dev.w3.org/html5/html-author/#the-th-elementhttp://dev.w3.org/html5/html-author/#the-th-elementhttp://dev.w3.org/html5/html-author/#the-th-elementhttp://dev.w3.org/html5/html-author/#the-th-elementhttp://dev.w3.org/html5/html-author/#the-th-elementhttp://dev.w3.org/html5/html-author/#formshttp://dev.w3.org/html5/html-author/#formshttp://dev.w3.org/html5/html-author/#formshttp://dev.w3.org/html5/html-author/#the-form-elementhttp://dev.w3.org/html5/html-author/#the-form-elementhttp://dev.w3.org/html5/html-author/#the-form-elementhttp://dev.w3.org/html5/html-author/#the-form-elementhttp://dev.w3.org/html5/html-author/#the-form-elementhttp://dev.w3.org/html5/html-author/#the-form-elementhttp://dev.w3.org/html5/html-author/#the-fieldset-elementhttp://dev.w3.org/html5/html-author/#the-fieldset-elementhttp://dev.w3.org/html5/html-author/#the-fieldset-elementhttp://dev.w3.org/html5/html-author/#the-fieldset-elementhttp://dev.w3.org/html5/html-author/#the-fieldset-elementhttp://dev.w3.org/html5/html-author/#the-fieldset-elementhttp://dev.w3.org/html5/html-author/#the-label-elementhttp://dev.w3.org/html5/html-author/#the-label-elementhttp://dev.w3.org/html5/html-author/#the-label-elementhttp://dev.w3.org/html5/html-author/#the-label-elementhttp://dev.w3.org/html5/html-author/#the-label-elementhttp://dev.w3.org/html5/html-author/#the-label-elementhttp://dev.w3.org/html5/html-author/#the-input-elementhttp://dev.w3.org/html5/html-author/#the-input-elementhttp://dev.w3.org/html5/html-author/#the-input-elementhttp://dev.w3.org/html5/html-author/#the-input-elementhttp://dev.w3.org/html5/html-author/#the-input-elementhttp://dev.w3.org/html5/html-author/#the-input-elementhttp://dev.w3.org/html5/html-author/#the-button-elementhttp://dev.w3.org/html5/html-author/#the-button-elementhttp://dev.w3.org/html5/html-author/#the-button-elementhttp://dev.w3.org/html5/html-author/#the-button-elementhttp://dev.w3.org/html5/html-author/#the-button-elementhttp://dev.w3.org/html5/html-author/#the-button-elementhttp://dev.w3.org/html5/html-author/#the-select-elementhttp://dev.w3.org/html5/html-author/#the-select-elementhttp://dev.w3.org/html5/html-author/#the-select-elementhttp://dev.w3.org/html5/html-author/#the-select-elementhttp://dev.w3.org/html5/html-author/#the-select-elementhttp://dev.w3.org/html5/html-author/#the-select-elementhttp://dev.w3.org/html5/html-author/#the-datalist-elementhttp://dev.w3.org/html5/html-author/#the-datalist-elementhttp://dev.w3.org/html5/html-author/#the-datalist-elementhttp://dev.w3.org/html5/html-author/#the-datalist-elementhttp://dev.w3.org/html5/html-author/#the-datalist-elementhttp://dev.w3.org/html5/html-author/#the-datalist-elementhttp://dev.w3.org/html5/html-author/#the-optgroup-elementhttp://dev.w3.org/html5/html-author/#the-optgroup-elementhttp://dev.w3.org/html5/html-author/#the-optgroup-elementhttp://dev.w3.org/html5/html-author/#the-optgroup-elementhttp://dev.w3.org/html5/html-author/#the-optgroup-elementhttp://dev.w3.org/html5/html-author/#the-optgroup-elementhttp://dev.w3.org/html5/html-author/#the-option-elementhttp://dev.w3.org/html5/html-author/#the-option-elementhttp://dev.w3.org/html5/html-author/#the-option-elementhttp://dev.w3.org/html5/html-author/#the-option-elementhttp://dev.w3.org/html5/html-author/#the-option-elementhttp://dev.w3.org/html5/html-author/#the-option-elementhttp://dev.w3.org/html5/html-author/#the-textarea-elementhttp://dev.w3.org/html5/html-author/#the-textarea-elementhttp://dev.w3.org/html5/html-author/#the-textarea-elementhttp://dev.w3.org/html5/html-author/#the-textarea-elementhttp://dev.w3.org/html5/html-author/#the-textarea-elementhttp://dev.w3.org/html5/html-author/#the-textarea-elementhttp://dev.w3.org/html5/html-author/#the-output-elementhttp://dev.w3.org/html5/html-author/#the-output-elementhttp://dev.w3.org/html5/html-author/#the-output-elementhttp://dev.w3.org/html5/html-author/#the-output-elementhttp://dev.w3.org/html5/html-author/#the-output-elementhttp://dev.w3.org/html5/html-author/#the-output-elementhttp://dev.w3.org/html5/html-author/#interactive-elementshttp://dev.w3.org/html5/html-author/#interactive-elementshttp://dev.w3.org/html5/html-author/#interactive-elementshttp://dev.w3.org/html5/html-author/#the-details-elementhttp://dev.w3.org/html5/html-author/#the-details-elementhttp://dev.w3.org/html5/html-author/#the-details-elementhttp://dev.w3.org/html5/html-author/#the-details-elementhttp://dev.w3.org/html5/html-author/#the-details-elementhttp://dev.w3.org/html5/html-author/#the-details-elementhttp://dev.w3.org/html5/html-author/#the-command-elementhttp://dev.w3.org/html5/html-author/#the-command-elementhttp://dev.w3.org/html5/html-author/#the-command-elementhttp://dev.w3.org/html5/html-author/#the-command-elementhttp://dev.w3.org/html5/html-author/#the-command-elementhttp://dev.w3.org/html5/html-author/#the-command-elementhttp://dev.w3.org/html5/html-author/#the-bb-elementhttp://dev.w3.org/html5/html-author/#the-bb-elementhttp://dev.w3.org/html5/html-author/#the-bb-elementhttp://dev.w3.org/html5/html-author/#the-bb-elementhttp://dev.w3.org/html5/html-author/#the-bb-elementhttp://dev.w3.org/html5/html-author/#the-bb-elementhttp://dev.w3.org/html5/html-author/#the-i-elementhttp://dev.w3.org/html5/html-author/#the-b-elementhttp://dev.w3.org/html5/html-author/#the-bdo-elementhttp://dev.w3.org/html5/html-author/#the-ruby-elementhttp://dev.w3.org/html5/html-author/#the-rt-elementhttp://dev.w3.org/html5/html-author/#the-rp-elementhttp://dev.w3.org/html5/html-author/#editshttp://dev.w3.org/html5/html-author/#the-ins-elementhttp://dev.w3.org/html5/html-author/#the-del-elementhttp://dev.w3.org/html5/html-author/#embedded-content-0http://dev.w3.org/html5/html-author/#the-figure-elementhttp://dev.w3.org/html5/html-author/#the-img-elementhttp://dev.w3.org/html5/html-author/#the-iframe-elementhttp://dev.w3.org/html5/html-author/#the-embed-elementhttp://dev.w3.org/html5/html-author/#the-object-elementhttp://dev.w3.org/html5/html-author/#the-param-elementhttp://dev.w3.org/html5/html-author/#the-video-elementhttp://dev.w3.org/html5/html-author/#the-audio-elementhttp://dev.w3.org/html5/html-author/#the-source-elementhttp://dev.w3.org/html5/html-author/#the-canvas-elementhttp://dev.w3.org/html5/html-author/#the-map-elementhttp://dev.w3.org/html5/html-author/#the-area-elementhttp://dev.w3.org/html5/html-author/#tabular-datahttp://dev.w3.org/html5/html-author/#the-table-elementhttp://dev.w3.org/html5/html-author/#the-caption-elementhttp://dev.w3.org/html5/html-author/#the-colgroup-elementhttp://dev.w3.org/html5/html-author/#the-col-elementhttp://dev.w3.org/html5/html-author/#the-tbody-elementhttp://dev.w3.org/html5/html-author/#the-thead-elementhttp://dev.w3.org/html5/html-author/#the-tfoot-elementhttp://dev.w3.org/html5/html-author/#the-tr-elementhttp://dev.w3.org/html5/html-author/#the-td-elementhttp://dev.w3.org/html5/html-author/#the-th-elementhttp://dev.w3.org/html5/html-author/#formshttp://dev.w3.org/html5/html-author/#the-form-elementhttp://dev.w3.org/html5/html-author/#the-fieldset-elementhttp://dev.w3.org/html5/html-author/#the-label-elementhttp://dev.w3.org/html5/html-author/#the-input-elementhttp://dev.w3.org/html5/html-author/#the-button-elementhttp://dev.w3.org/html5/html-author/#the-select-elementhttp://dev.w3.org/html5/html-author/#the-datalist-elementhttp://dev.w3.org/html5/html-author/#the-optgroup-elementhttp://dev.w3.org/html5/html-author/#the-option-elementhttp://dev.w3.org/html5/html-author/#the-textarea-elementhttp://dev.w3.org/html5/html-author/#the-output-elementhttp://dev.w3.org/html5/html-author/#interactive-elementshttp://dev.w3.org/html5/html-author/#the-details-elementhttp://dev.w3.org/html5/html-author/#the-command-elementhttp://dev.w3.org/html5/html-author/#the-bb-element
  • 8/8/2019 HTML 5 Reference

    5/86

    4. 4.3.11.4 The menu element

    12.4.3.12 Miscellaneous Elements1. 4.3.12.1 The legend element

    2. 4.3.12.2 The div element

    5. 5 Index of Elements

    1. 5.1 Conforming Elements2. 5.2 Obsolete Elements3. 5.3 Comparison of HTML 4.01 and HTML 5 Elements

    6. 6 How to Read This Guide1. 6.1 Conventions

    1. 6.1.1Notes, Tips and Warnings2. 6.1.2 Example Markup

    1. 6.1.2.1 Attributes2. 6.1.2.2 Void Elements3. 6.1.2.3Namespaces

    1 Introduction

    This document serves as a reference guide for the HTML syntax, vocabularyand its associated DOM APIs and is intended for web site and applicationdevelopers, publishers, tutorial writers and teachers and their students. That is,people who write documents using HTML, or who teach others to do so. Thisguide is structured into three major sections.

    The first provides an introductory tutorial on writing HTML, explaining the basicstructure and syntax of an HTML document, covering the fundamental

    techniques and best practices, encouraging the use of clean and valid markup,and the use of quality assurance tools.

    The second section provides an in depth look at the syntax of HTML andXHTML documents. This will investigate both the similarities and differencesbetween the two alternatives and provides guidance on choosing which to usefor your own projects, depending on your needs. Additionally, this will alsoprovide details about creating polyglot documentsthat is, documents thatconform to both HTML and XHTML simultaneiouslyincluding issues related toensuring stylesheets and scripts work correctly under both conditions.

    The third and final section provides a reference for the HTML vocabulary. Eachelement is described, providing details about its its meaning, allowed attributes,content models and DOM APIs. Each is accompanied by clear examplesillustrating how the element is designed to be used for a range of different usecases.

    2 Getting Started with HTML 5

    The most common format for publishing documents on the web and creatingweb applications is HTML. From its beginning as a relatively simple language

    primarily designed for describing scientific documents, it has grown andadapted to a wide variety needs ranging from publishing news and blogs, to

    http://dev.w3.org/html5/html-author/#the-menu-elementhttp://dev.w3.org/html5/html-author/#the-menu-elementhttp://dev.w3.org/html5/html-author/#the-menu-elementhttp://dev.w3.org/html5/html-author/#the-menu-elementhttp://dev.w3.org/html5/html-author/#the-menu-elementhttp://dev.w3.org/html5/html-author/#the-menu-elementhttp://dev.w3.org/html5/html-author/#miscellaneous-elementshttp://dev.w3.org/html5/html-author/#miscellaneous-elementshttp://dev.w3.org/html5/html-author/#miscellaneous-elementshttp://dev.w3.org/html5/html-author/#the-legend-elementhttp://dev.w3.org/html5/html-author/#the-legend-elementhttp://dev.w3.org/html5/html-author/#the-legend-elementhttp://dev.w3.org/html5/html-author/#the-legend-elementhttp://dev.w3.org/html5/html-author/#the-legend-elementhttp://dev.w3.org/html5/html-author/#the-legend-elementhttp://dev.w3.org/html5/html-author/#the-div-elementhttp://dev.w3.org/html5/html-author/#the-div-elementhttp://dev.w3.org/html5/html-author/#the-div-elementhttp://dev.w3.org/html5/html-author/#the-div-elementhttp://dev.w3.org/html5/html-author/#the-div-elementhttp://dev.w3.org/html5/html-author/#the-div-elementhttp://dev.w3.org/html5/html-author/#index-of-elementshttp://dev.w3.org/html5/html-author/#index-of-elementshttp://dev.w3.org/html5/html-author/#index-of-elementshttp://dev.w3.org/html5/html-author/#conforming-elementshttp://dev.w3.org/html5/html-author/#conforming-elementshttp://dev.w3.org/html5/html-author/#conforming-elementshttp://dev.w3.org/html5/html-author/#obsolete-elementshttp://dev.w3.org/html5/html-author/#obsolete-elementshttp://dev.w3.org/html5/html-author/#obsolete-elementshttp://dev.w3.org/html5/html-author/#comparison-of-html-4.01-and-html-5-elementshttp://dev.w3.org/html5/html-author/#comparison-of-html-4.01-and-html-5-elementshttp://dev.w3.org/html5/html-author/#comparison-of-html-4.01-and-html-5-elementshttp://dev.w3.org/html5/html-author/#how-to-read-this-guidehttp://dev.w3.org/html5/html-author/#how-to-read-this-guidehttp://dev.w3.org/html5/html-author/#how-to-read-this-guidehttp://dev.w3.org/html5/html-author/#conventionshttp://dev.w3.org/html5/html-author/#conventionshttp://dev.w3.org/html5/html-author/#conventionshttp://dev.w3.org/html5/html-author/#notes,-tips-and-warningshttp://dev.w3.org/html5/html-author/#notes,-tips-and-warningshttp://dev.w3.org/html5/html-author/#notes,-tips-and-warningshttp://dev.w3.org/html5/html-author/#example-markuphttp://dev.w3.org/html5/html-author/#example-markuphttp://dev.w3.org/html5/html-author/#example-markuphttp://dev.w3.org/html5/html-author/#attributes-95http://dev.w3.org/html5/html-author/#attributes-95http://dev.w3.org/html5/html-author/#attributes-95http://dev.w3.org/html5/html-author/#void-elementshttp://dev.w3.org/html5/html-author/#void-elementshttp://dev.w3.org/html5/html-author/#void-elementshttp://dev.w3.org/html5/html-author/#namespaceshttp://dev.w3.org/html5/html-author/#namespaceshttp://dev.w3.org/html5/html-author/#namespaceshttp://dev.w3.org/html5/html-author/#the-menu-elementhttp://dev.w3.org/html5/html-author/#miscellaneous-elementshttp://dev.w3.org/html5/html-author/#the-legend-elementhttp://dev.w3.org/html5/html-author/#the-div-elementhttp://dev.w3.org/html5/html-author/#index-of-elementshttp://dev.w3.org/html5/html-author/#conforming-elementshttp://dev.w3.org/html5/html-author/#obsolete-elementshttp://dev.w3.org/html5/html-author/#comparison-of-html-4.01-and-html-5-elementshttp://dev.w3.org/html5/html-author/#how-to-read-this-guidehttp://dev.w3.org/html5/html-author/#conventionshttp://dev.w3.org/html5/html-author/#notes,-tips-and-warningshttp://dev.w3.org/html5/html-author/#example-markuphttp://dev.w3.org/html5/html-author/#attributes-95http://dev.w3.org/html5/html-author/#void-elementshttp://dev.w3.org/html5/html-author/#namespaces
  • 8/8/2019 HTML 5 Reference

    6/86

    providing the foundation for full blown applications for email, maps, wordprocessing and spreadsheets.

    As the uses of HTML have grown, the demands placed upon it by authors haveincreased and the limitations of HTML become more pronounced. HTML 5 is

    represents the next major step in the development of HTML, introducing a widerange of new features into the language. Authors who are familiar with previousversions of HTML are advised to familiarise themselves with the differences fromHTML 4 [HTML4DIFF]

    This section provides an introductory tutorial to help get you started with HTML,and is suitable for beginners. Experienced authors may choose to skip thissection and proceed to the syntax overview and the element reference.

    2.1 A Basic Document

    The goal of this section is to walk people though creating example01.html

    To begin, were going to create a very basic HTML document, which will alsoserve as a useful template for future HTML documents. This document willsimply contain a title and short paragraph.

    Open a text editor and create a new, empty file. I suggest you save the file asexample01.html.

    All HTML documents need to begin with a DOCTYPE. The DOCTYPE is aremnant from the early days of the web. For historical reasons, it is needed toensure that web browsers interpret the document correctly, rather than using aspecial compatibility mode designed to replicate the behaviour of olderbrowsers.

    In your text editor, type the following on the first line, and save the file.

    Because this is required for all documents, it is good practice to get in the habit

    of always typing that as the first line in all new HTML documents you create, sothat it never gets forgotten.

    An HTML document is divided into two main sections. The head, which is usedto contain document metadata, such as the title, stylesheets and scripts; andthe body, which contain all of the pages content. The markup itself forms a treestructure, as illustrated in the following diagram.

    2.2 Understanding Semantics

    In general, the purpose of writing and publishing a document is to conveyinformation to the readers. This could be any kind of information, such as tellinga story, reporting news and current affairs or describing available products and

    http://www.w3.org/TR/html5-diff/http://www.w3.org/TR/html5-diff/http://dev.w3.org/html5/html-author/examples/example01.htmlhttp://www.w3.org/TR/html5-diff/http://www.w3.org/TR/html5-diff/http://dev.w3.org/html5/html-author/examples/example01.html
  • 8/8/2019 HTML 5 Reference

    7/86

    services. Whatever the information is, it needs to be conveyed to the reader in away that can be easily understood.

    A typical document, such as an book, news article, blog entry or letter is oftengrouped into different sections containing a variety of headings, paragraphs,

    lists, tables, quotes and various other typographical structures. All of thesestructures are important for more easily conveying information to the reader.HTML provides the means to clearly identify each of these structures in a waythat can then be easily presented to the user. In essence, this is the purpose ofmarkup, and HTML in particular.

    Markup is a machine readable language that describes aspects of a documentsuch as its structure, semantics and/or style. Some markup languages aredesigned solely for the purpose of describing the presentation of the document,such as RTF (Rich Text Format). Others, such as HTML, are more generic andrather than focussing on describing the presentation, they are designed to focus

    on describing the meaning or purpose of the content and leave the presentationfor another layer to deal with.

    HTML provides a wide variety of semantic elements that can be used to markup various common typographical structures. There are heading elements formarking up different levels of headings, a paragraph (p) element for paragraph,various list elements for marking up different types of lists, and a table elementsfor marking up tables.

    Its important to distinguish between the structure and semantics of content,which should be described using HTML, and its presentation. In one document,a heading may be presented visually in a large bold typeface with wide marginsabove and below to separate it from the surrounding content and make it standout. In another document, a heading may be presented in a light coloured, italic,fancy script typeface. But regardless of the presentation, its still a heading andthe markup can still uses the same basic elements for identifying commonstructures.

    3 The HTML and XHTML Syntax

    It is useful to make a distinction between the vocabulary of an HTML document

    the elements and attributes, and their meaningsand the syntax in which it iswritten.

    HTML has a defined set of elements and attributes which can be used in adocument; each designed for a specific purpose with their own meaning.Consider this set of elements to be analogous to the list of words in a dictionary.This includes elements for headings, paragraphs, lists, tables, links, formcontrols and many other features. This is the vocabulary of HTML. Similarly, justas natural languages have grammatical rules for how different words can beused, HTML has rules for where and how each element and attribute can beused.

  • 8/8/2019 HTML 5 Reference

    8/86

    The basic structure of elements in an HTML document is a tree structure. Mostelements have at most one parent element, (except for the root element), andmay have any number of child elements. This structure needs to be reflected inthe syntax used to write the document.

    3.1 Syntactic Overview

    There are two syntaxes that can be used: the traditional HTML syntax, and theXHTML syntax. While these are similar, each is optimised for different needsand authoring habits. The former is more lenient in its design and handlingrequirements, and has a number of convenient shorthands for authors to use.The latter is based on XML and has much stricter syntactic requirements,designed to discourage the proliferation of syntactic errors.

    The HTML syntax is loosely based upon the older, though very widely usedsyntax from HTML 4.01. Although it is inspired by its SGML origins, in practice,it really only shares minor syntactic similarities. This features a range ofshorthand syntaxes, designed to make hand coding more convenient, such asallowing the omission of some optional tags and attribute values. Authors arefree to choose whether or not they wish to take advantage of these shorthandfeatures based upon their own personal preferences.

    The following example illustrates a basic HTML document, demonstrating someshorthand syntax:

    HTML Example:

    An HTML Document

    Example

    This is an example HTML document.

    XHTML, however, is based on the much more strict XML syntax. While this too

    is inspired by SGML, this syntax requires documents to be well-formed, whichsome people prefer because of its stricter error handling, forcing authors tomaintain cleaner markup.

    XHTML Example:

    An HTML Document

    Example

    This is an example HTML document.

  • 8/8/2019 HTML 5 Reference

    9/86

    Note: The XHTML document does not need to include the DOCTYPE becauseXHTML documents that are delivered correctly using an XML MIME type andare processed as XML by browsers, are always rendered in no quirks mode.

    However, the DOCTYPE may optionally be included, and should be included ifthe document uses the compatible subset of markup that is conforming in bothHTML and XHTML, and is ever expected to be used in text/html

    environments.

    Due to the similarities of both the HTML and XHTML syntaxes, it is possible tomark up documents using a common subset of the syntax that is the same inboth, while avoiding the syntactic sugar that is unique to each. This type ofdocument is known as a polyglot document because it simultaneously conformsto both syntaxes and may be handled as either. There are a number of issuesinvolved with creating such documents and authors wishing to do so should

    familiarise themselves with the similarities and differences between HTML andXHTML.

    3.2 The Syntax

    There are a number of basic components make up the syntax of HTML, that areused throughout any document. These include the DOCTYPE declaration,

    elements, attributes, comments, text and CDATA sections.

    3.2.1 DOCTYPE Declaration

    The Document Type Declaration needs to be present at the beginning of adocument that uses the HTML syntax. It may optionally be used within theXHTML syntax, but it is not required. The canonical DOCTYPE that most HTMLdocuments should use is as follows:

    For compatibility with legacy producers of HTML that is, software that outputsHTML documents an alternative DOCTYPE is available for use by systems that

    are unable to output the DOCTYPE given above. This limitation occurs in software

    that expects a DOCTYPE to include either a PUBLIC orSYSTEM identifier, and isunable to omit them. The canonical form of this DOCTYPE is as follows:

    Note: The term "legacy-compat" refers to compatibility with legacy producersonly. In particular, it does not refer to compatibility with legacy browsers, which,in practice, ignore SYSTEM identifiers and DTDs.

    In HTML, the DOCTYPE is case insensitive, except for the quoted string

    "about:legacy-compat", which must be written in lower case. This quoted

    string, however, may also be quoted with single quotes, rather than doublequotes. The emphasised parts below illustrate which parts are case insensitive.

  • 8/8/2019 HTML 5 Reference

    10/86

    HTML Example:

    The following are also valid alternatives in the HTML syntax:

    HTML Example:

    For XHTML, it is recommended that the DOCTYPE be omitted because it is

    unnecessary. However, should you wish to use a DOCTYPE, note that the DOCTYPEis case sensitive, and only the canonical versions of these DOCTYPEs given

    above may be used.

    XHTML Example:

    However, there are no restrictions placed on the use of alternative DOCTYPEs in

    XHTML. You may, if you wish, use a custom DOCTYPE referring to a custom

    DTD, typically for validation purposes. Although, be advised that DTDs have anumber of limitations compared with other alternative schema languages andvalidation techniques.

    3.2.1.1 Historical Notes

    This section needs revising and may be moved to an external document andsimply referred to.

    The DOCTYPE originates from HTMLs SGML lineage and, in previous levels of

    HTML, was originally used to refer to a Document Type Definition (DTD) aformal declaration of the elements, attributes and syntactic features that couldbe used within the document. Those who are familiar with previous levels ofHTML will notice that there is no PUBLIC identifier present in this DOCTYPE, which

    were used to refer to the DTD. Also, note that the about: URI scheme in the

    SYSTEM identifier of the latterDOCTYPE is used specifically because it cannot be

    resolved to any specific DTD.

  • 8/8/2019 HTML 5 Reference

    11/86

    As HTML5 is no longer formally based upon SGML, the DOCTYPE no longer

    serves this purpose, and thus no longer needs to refer to a DTD. However, dueto legacy constraints, it has gained another very important purpose: triggeringno-quirks mode in browsers.

    HTML 5 defines three modes: quirks mode, limited quirks mode and noquirks mode, of which only the latter is considered conforming to use. Thereason for this is due to backwards compatibility. The important thing tounderstand is that there are some differences in the way documents are visuallyrendered in each of the modes; and to ensure the most standards compliantrendering, it is important to ensure no-quirks mode is used.

    3.2.2 Elements

    Elements are marked up using start tags and end tags. Tags are delimitedusing angle brackets with the tag name in between. The difference between

    start tags and end tags is that the latter includes a slash before the tag name.

    Example:

    This example paragraph illustrates the use of start tags and end tags.

    The quick brown fox jumps over the lazy dog.

    In both tags, whitespace is permitted between the tag name and the closingright angle bracket, however it is usually omitted because its redundant.

    In XHTML, tag names are case sensitive and are usually defined to be written inlowercase. In HTML, however, tag names are case insensitive and may bewritten in all uppercase or mixed case, although the most common conventionis to stick with lowercase. The case of the start and end tags do not have to bethe same, but being consistent does make the code look cleaner.

    HTML Example:

    ...

    An empty element is any element that does not contain any content within it. Ingeneral, an empty element is just one with a start tag immediately followed byits associated end tag. In both HTML and XHTML syntaxes, this can berepresented in the same way.

    Example:

    Some elements, however, are forbidden from containing any content at all.These are known as void elements. In HTML, the above syntax cannot be used

    for void elements. For such elements, the end tag must be omitted because theelement is automatically closed by the parser. Such elements include, amongothers, br, hr, link and meta

    http://dev.w3.org/html5/html-author/#the-br-elementhttp://dev.w3.org/html5/html-author/#the-hr-elementhttp://dev.w3.org/html5/html-author/#the-link-elementhttp://dev.w3.org/html5/html-author/#the-meta-elementhttp://dev.w3.org/html5/html-author/#the-br-elementhttp://dev.w3.org/html5/html-author/#the-hr-elementhttp://dev.w3.org/html5/html-author/#the-link-elementhttp://dev.w3.org/html5/html-author/#the-meta-element
  • 8/8/2019 HTML 5 Reference

    12/86

    HTML Example:

    In XHTML, the XML syntactic requirements dictate that this must be made

    explicit using either an explicit end tag, as above, or the empty element syntax.This is achieved by inserting a slash at the end of the start tag immediatelybefore the right angle bracket.

    Example:

    Authors may optionally choose to use this same syntax for void elements in theHTML syntax as well. Some authors also choose to include whitespace beforethe slash, however this is not necessary. (Using whitespace in that fashion is a

    convention inherited from the compatibility guidelines in XHTML 1.0, AppendixC.)

    3.2.3 Attributes

    Elements may contain attributes that are used to set various properties of anelement. Some attributes are defined globally and can be used on any element,while others are defined for specific elements only. All attributes have a nameand a value and look like this.

    Example:

    This example illustrates how to mark up a divelement with an attribute named

    class using a value of"example".

    ...

    Attributes may only be specified within start tags and must never be used in endtags.

    Erroneous Example:

    ...

    In XHTML, attribute names are case sensitive and most are defined to belowercase. In HTML, attribute names are case insensitive, and so they could bewritten in all uppercase or mixed case, depending on your own preferences. It isconventional, however, to use the same case as would be used in XHTML,which is generally all lowercase.

    HTML Example:

    http://dev.w3.org/html5/html-author/#the-div-elementhttp://dev.w3.org/html5/html-author/#the-div-elementhttp://dev.w3.org/html5/html-author/#the-div-element
  • 8/8/2019 HTML 5 Reference

    13/86

    In general, the values of attributes can contain any text or character references,although depending on the syntax used, some additional restrictions apply,which are outlined below.

    There are four slightly different syntaxes that may be used for attributes in

    HTML: empty, unquoted, single-quoted and double-quoted. All four syntaxesmay be used in the HTML syntax, depending on what is needed for eachspecific attribute. However, in the XHTML syntax, attribute values must alwaysbe quoted using either single or double quotes.

    3.2.3.1 Empty Attributes

    An empty attribute is one where the value has been omitted. This is a syntacticshorthand for specifying the attribute with an empty value, and is commonlyused for boolean attributes. This syntax may be used in the HTML syntax, butnot in the XHTML syntax.

    Note: In previous editions of HTML, which were formally based on SGML, itwas technically an attributes name that could be omitted where the value was aunique enumerated value specified in the DTD. However, due to legacyconstraints, this has been changed in HTML5 to reflect the wayimplementations really work.

    HTML Example:

    ...

    The previous example is equivalent to specifying the attribute with an emptystring as the value.

    ...

    Note: The previous example is semantically equivalent to specifying theattribute with the value "disabled", but it is not exactly the same.

    Example:

    The previous example is equivalent to specifying the attribute with an emptystring as the value.

    3.2.3.2 Unquoted Attribute Values

    In HTML, but not in XHTML, the quotes surrounding the value may also beomitted in most cases. The value may contain any characters except forspaces, single or double quotes (' or"), an equals sign (=) or a greater-thansymbol (>). If you need an attribute to contain those characters, they either need

  • 8/8/2019 HTML 5 Reference

    14/86

    to be escaped using character references, or you need to use either the single-or double-quoted attribute values.

    Some additional characters cannot be used in unquoted attribute values,including space characters, single (') or double (") quotation marks, equals

    signs (=) or greater than signs (>).

    HTML Example:

    3.2.3.3 Double-Quoted Attribute Values

    In both HTML and XHTML, attribute values may be surrounded with doublequotes.

    By quoting attributes, the value may contain the additional characters that cantbe used in unquoted attribute values, but for obvious reasons, these attributescannot contain additional double quotation marks within the value.

    Example:

    ...

    3.2.3.4 Single-Quoted Attribute Values

    In both HTML and XHTML, attribute values may be surrounded with single

    quotes.

    By quoting attributes, the value may contain the additional characters that cantbe used in unquoted attribute values, but for obvious reasons, these attributescannot contain additional single quotation marks within the value.

    Example:

    ...

    3.2.4 Comments

    ...

    3.2.5 Text

    ...

    3.2.6 CDATA Sections

    ...

    3.2.7 Character References

  • 8/8/2019 HTML 5 Reference

    15/86

    Discuss numeric and named character reference syntax. May link to the list ofentity references in a separate document, rather than trying to list them all inhere.

    3.3 Understanding MIME Types

    Discuss text/html, application/xhtml+xml , etc.

    3.4 Character Encoding

    Overview of Unicode, character repertoires, encodings, etc. Declaring theencoding with the Content-Type header, BOM, meta, etc.

    3.5 Choosing HTML or XHTML

    The choice of HTML or XHTML syntax is largely dependent upon a number offactors the, including needs of a given project, the skill set of the developersinvolved, level of support in browsers used by the sites target audience, or itmay simply be a matter of personal preference.

    The important thing to understand is that there are valid reasons to chooseboth, and that authors are encouraged to make an informed decision.

    Need to develop guidelines to help authors make this choice.

    3.6 Polyglot Documents

    A polyglot HTML document is a document that conforms to both the HTML andXHTML syntactic requirements, and which can be processed as either bybrowsers, depending on the MIME type used. This works by using a commonsubset of the syntax that is shared by both HTML and XHTML.

    Polyglot documents are useful to create for situations where a document isintended to be served as either HTML or XHTML, depending on the support inparticular browsers, or when it is not known at the time of creation, which MIMEtype the document will ultimately be served as.

    In order to successfully create and maintain polyglot documents, authors needto be familiar with both the similarities and differences between the twosyntaxes. This includes not only syntactic differences, but also differences in theway stylesheets, and scripts are handled, and the way in which characterencodings are detected.

    This section will provide the details about each of these similarities anddifferences, and provide guidelines on the creation of polyglot documents.

    Base this on the HTML vs. XHTML article.

    4 The HTML Vocabulary and APIs

    http://dev.w3.org/html5/html-author/#the-meta-elementhttp://wiki.whatwg.org/wiki/HTML_vs._XHTMLhttp://dev.w3.org/html5/html-author/#the-meta-elementhttp://wiki.whatwg.org/wiki/HTML_vs._XHTML
  • 8/8/2019 HTML 5 Reference

    16/86

    4.1 Categories

    Each element in HTML falls into zero or more categories that group elementswith similar characteristics together. The following categories are used in thisguide:

    Metadata content

    Flow content

    Sectioning root

    Sectioning content

    Heading content

    Phrasing content

    Embedded content

    Interactive content

    Transparent

    Some elements have unique requirements and do not fit into any particularcategory.

    These categories are related as follows:

    [Create and link to some sort of index of elements that lists each element ineach category.]

    4.1.1 Metadata Content

    Metadata content includes elements for marking up document metadata;marking up or linking to resources that describe the behaviour or presentation ofthe document; or indicate relationships with other documents.

    Metadata elements appear within the headof a document. Some common

    examples of metadata elements include: title,meta, link, scriptand style.

    4.1.2 Flow content

    Most elements that are used in the body of documents and applications arecategorised as flow content. Most of the elements used to mark up the main

    content in the body of a page are considered to be flow content. In general, thisincludes elements that are presented visually as either block level or inline level.

    Some common flow content includes elements like div,p, em and strong.

    Elements categorised as heading content, phrasing content or embeddedcontent are also considered to be flow content.

    4.1.3 Sectioning root

    [This description needs improving.]

    http://dev.w3.org/html5/html-author/#metadata-contenthttp://dev.w3.org/html5/html-author/#flow-contenthttp://dev.w3.org/html5/html-author/#sectioning-roothttp://dev.w3.org/html5/html-author/#sectioning-contenthttp://dev.w3.org/html5/html-author/#heading-contenthttp://dev.w3.org/html5/html-author/#phrasing-contenthttp://dev.w3.org/html5/html-author/#embedded-contenthttp://dev.w3.org/html5/html-author/#interactive-contenthttp://dev.w3.org/html5/html-author/#transparent-content-modelshttp://dev.w3.org/html5/html-author/#the-head-elementhttp://dev.w3.org/html5/html-author/#the-head-elementhttp://dev.w3.org/html5/html-author/#the-title-elementhttp://dev.w3.org/html5/html-author/#the-title-elementhttp://dev.w3.org/html5/html-author/#the-meta-elementhttp://dev.w3.org/html5/html-author/#the-link-elementhttp://dev.w3.org/html5/html-author/#the-script-elementhttp://dev.w3.org/html5/html-author/#the-script-elementhttp://dev.w3.org/html5/html-author/#the-style-elementhttp://dev.w3.org/html5/html-author/#the-div-elementhttp://dev.w3.org/html5/html-author/#the-div-elementhttp://dev.w3.org/html5/html-author/#the-p-elementhttp://dev.w3.org/html5/html-author/#the-em-elementhttp://dev.w3.org/html5/html-author/#the-strong-elementhttp://dev.w3.org/html5/html-author/#the-strong-elementhttp://dev.w3.org/html5/html-author/#metadata-contenthttp://dev.w3.org/html5/html-author/#flow-contenthttp://dev.w3.org/html5/html-author/#sectioning-roothttp://dev.w3.org/html5/html-author/#sectioning-contenthttp://dev.w3.org/html5/html-author/#heading-contenthttp://dev.w3.org/html5/html-author/#phrasing-contenthttp://dev.w3.org/html5/html-author/#embedded-contenthttp://dev.w3.org/html5/html-author/#interactive-contenthttp://dev.w3.org/html5/html-author/#transparent-content-modelshttp://dev.w3.org/html5/html-author/#the-head-elementhttp://dev.w3.org/html5/html-author/#the-title-elementhttp://dev.w3.org/html5/html-author/#the-meta-elementhttp://dev.w3.org/html5/html-author/#the-link-elementhttp://dev.w3.org/html5/html-author/#the-script-elementhttp://dev.w3.org/html5/html-author/#the-style-elementhttp://dev.w3.org/html5/html-author/#the-div-elementhttp://dev.w3.org/html5/html-author/#the-p-elementhttp://dev.w3.org/html5/html-author/#the-em-elementhttp://dev.w3.org/html5/html-author/#the-strong-element
  • 8/8/2019 HTML 5 Reference

    17/86

    These elements can have their own outlines, but the sections and headersinside these elements do not contribute to the outlines of their ancestors.

    Some common sectioning root elements include, among others, body,

    blockquote and figure.

    4.1.4 Sectioning content

    Sectioning content is used for structuring a document into sections, each ofwhich generally has its own heading. These elements provide a scope withinwhich associated headers, footers and contact information apply.

    Some common sectioning elements include, among others, section, article

    and nav.

    Most sectioning elements, with the exception of the body element, are alsoclassified as flow content.

    4.1.5 Heading content

    Heading content includes the elements for marking up headers. Headings, inconjunction with the sectioning elements, are used to describe the the structureof the document.

    Heading content includes the headerelement and the h1 to h6 elements.

    Elements categorised as heading content are considered to be flow content.

    4.1.6 Phrasing content

    Phrasing content includes text and text-level markup. This is similar to theconcept of inline level elements in HTML 4.01. Most elements that arecategorised as phrasing content can only contain other phrasing content.

    Some common examples of phrasing content elements include abbr, em, strongand span

    Elements categorised as phrasing content are considered to be flow content.

    4.1.7 Embedded content

    Embedded content includes elements that load external resources into thedocument. Such external resources include, for example, images, videos andFlash-based content. Some embedded content elements include img, object,

    embed and video.

    Elements categorised as embedded content are considered to be phrasingcontent, and thus also considered to be flow content.

    4.1.8 Interactive content

    http://dev.w3.org/html5/html-author/#the-body-elementhttp://dev.w3.org/html5/html-author/#the-blockquote-elementhttp://dev.w3.org/html5/html-author/#the-figure-elementhttp://dev.w3.org/html5/html-author/#the-section-elementhttp://dev.w3.org/html5/html-author/#the-article-elementhttp://dev.w3.org/html5/html-author/#the-nav-elementhttp://dev.w3.org/html5/html-author/#the-header-elementhttp://dev.w3.org/html5/html-author/#the-header-elementhttp://dev.w3.org/html5/html-author/#the-h1,-h2,-h3,-h4,-h5,-and-h6-elementshttp://dev.w3.org/html5/html-author/#the-h1,-h2,-h3,-h4,-h5,-and-h6-elementshttp://dev.w3.org/html5/html-author/#the-abbr-elementhttp://dev.w3.org/html5/html-author/#the-em-elementhttp://dev.w3.org/html5/html-author/#the-strong-elementhttp://dev.w3.org/html5/html-author/#the-span-elementhttp://dev.w3.org/html5/html-author/#the-img-elementhttp://dev.w3.org/html5/html-author/#the-object-elementhttp://dev.w3.org/html5/html-author/#the-embed-elementhttp://dev.w3.org/html5/html-author/#the-video-elementhttp://dev.w3.org/html5/html-author/#the-body-elementhttp://dev.w3.org/html5/html-author/#the-blockquote-elementhttp://dev.w3.org/html5/html-author/#the-figure-elementhttp://dev.w3.org/html5/html-author/#the-section-elementhttp://dev.w3.org/html5/html-author/#the-article-elementhttp://dev.w3.org/html5/html-author/#the-nav-elementhttp://dev.w3.org/html5/html-author/#the-header-elementhttp://dev.w3.org/html5/html-author/#the-h1,-h2,-h3,-h4,-h5,-and-h6-elementshttp://dev.w3.org/html5/html-author/#the-h1,-h2,-h3,-h4,-h5,-and-h6-elementshttp://dev.w3.org/html5/html-author/#the-abbr-elementhttp://dev.w3.org/html5/html-author/#the-em-elementhttp://dev.w3.org/html5/html-author/#the-strong-elementhttp://dev.w3.org/html5/html-author/#the-span-elementhttp://dev.w3.org/html5/html-author/#the-img-elementhttp://dev.w3.org/html5/html-author/#the-object-elementhttp://dev.w3.org/html5/html-author/#the-embed-elementhttp://dev.w3.org/html5/html-author/#the-video-element
  • 8/8/2019 HTML 5 Reference

    18/86

    Interactive elements are those that allow the user to interact with or activate insome way. Depending on the users browser and device, this could beperformed using any kind of input device, such as, for example, a mouse,keyboard, touch screen or voice input.

    Some common examples of interacti