HTML <html> tag
The <html> tag signifies the beginning of an HTML document. It is the root element (main tag) of an HTML document in which all the other tags for an HTML document are enclosed.
NOTE: The <!DOCTYPE> declaration is the only thing in an HTML document that comes before the <html> tag. The <!DOCTYPE> declaration MUST be the very first tag in an HTML document.
Attributes
| Attribute | Description | Possible values |
|---|---|---|
| xmlns | should be used with XHTML documents, it will specify the namespace to use | "http://www.w3.org/1999/xhtml" |
NOTE: The namespace at "http://www.w3.org/1999/xhtml" is used by XHTML documents by default and adding the xmlns attribute to the <html> tag is optional.
NOTE: If you're going to use the xmlns attribute, use it only in XHTML documents, it is invalid in HTML documents.
Standard attributes
dir, lang, xml:lang
For more information on standard attributes, check out our HTML standard attributes reference page.
Event attributes
NONE
For more information on event attributes, check out our HTML event attributes reference page.