HTML

HTMLHtmlElement

HTMLHtmlElement<html>

The HTMLHtmlElement interface represents as the root node for a given HTML document. The <html> tag is the container for all other HTML elements (except for the <!DOCTYPE> tag). This object inherits the properties and methods described in the HTMLElement interface. You can retrieve the HTMLHtmlElement object for a given document by reading the value of the document. documentElement property.
Notes: To specify the language of the Web page, the lang property must always be included inside the <html> tag. Search engines and browsers are expected to assist from this.

Attribute Value Description Example
xmlns http://www.w3.org/1999/xhtml Specifies the XML namespace attribute (If you need your content to conform to XHTML) <head> <title>Title of the document</title> </head> <body> The content of the document...... </body> </html>

Browser Compatibility

Element Chrome Edge Firefox Safari Opera
<html> Yes Yes Yes Yes Yes