http://dev.w3.org/html5/html-author/

4.3.1 
The Root Element

4.3.1.1 The html element

The html element represents the root of an HTML document.

Start tag:
 
optional
 
End tag:
 
optional
Categories:
  • None.
Contained By:
  • As the root element of a document.
  • Wherever a subdocument fragment is allowed in a compound document.
Content Model:
  • head element followed by a body element.
Attributes
DOM Interface
  • Uses HTMLElement.

The html element is the root element of a document. Every document must begin with this element, and it must contain both the head and body elements.

It is considered good practice to specify the primary language of the document on this element using the lang attribute.

HTML Example:

<!DOCTYPE html>
<html lang="en">
  <head>
    ...
  </head>
  <body>
    ...
  </body>
</html>

In the HTML syntax only, both the start and end tags are optional, and so for convenience either may be omitted, unless you wish to specify attributes on this element, in which case, at least the start tag needs to be included.

HTML Example:

<!DOCTYPE html>
<head>
  ...
</head>
<body>
  ...
</body>

In the XHTML syntax, the xmlns attribute needs to be specified on this element to declare that it is in the HTML namespace. You may use either the lang or xml:lang attribute to specify the langauge.

XHTML Example:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
  <head>
    ...
  </head>
  <body>
    ...
  </body>
</html>
manifest
The manifest attribute gives the address of the document’s application cache manifest, if there is one. If the attribute is present, the attribute’s value must be a valid URL.

Need to describe application cache manifests.


'HTML & Script' 카테고리의 다른 글

encodeURI  (0) 2011.09.27
jQuery 폼유효성검사 간단히  (0) 2011.09.26
오른쪽 마우스 및 키보드 사용 금지  (0) 2011.05.25
자바스크립트 타이머  (0) 2011.05.25
Popup Windows: Full Screen  (0) 2011.05.25

+ Recent posts