html
Definition
The html element is the root element that contains all other elements. It must appear only once and usually follows the document declaration.
Example
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">...The head, body, etc. goes here...</html>
Attributes
Basic
xmlns- This attribute is required and the value should be
http://www.w3.org/1999/xhtml.
Advanced
version- (Text) This attribute has been deprecated (made outdated). It is redundant, because version information is now provided by the DOCTYPE.
Common internationalization attributes
xml:lang- (NameToken) This attribute specifies the base language of an element's attribute values and text content.
dirThis attribute specifies the base direction of text. Possible values:
ltr: Left-to-rightrtl: Right-to-left
Contains
The following elements must each appear exactly once, and in the order listed.