HTML <html> Tag


All other HTML components are contained within the html tag. This tag is sometimes referred to as the <html> element.

Except for the <!DOCTYPE> tag, the <html> tag serves as a container for all other HTML components.

To define the language of the Web page, always use the lang attribute inside the <html> tag. This is intended to help search engines and browsers.

Syntax

Example

Preview

Attributes

Attribute Value Description
xmlns https://webtutor.dev/html/xhtml This property specifies the XML namespace (If you need your content to conform to XHTML)

Supported Browsers

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