HTML <html> tag

HTML <html> tag

The <html> tag tells the browser to treat this file as as HTML document.

The <html> tag represents the root of an HTML document.

All other HTML elements must be descendants of <html> element. (except for the <!DOCTYPE> tag).

Note: Do not forget to mention the language used in the HTML document using the lang global attribute.

Example

HTML Online Editor
<!DOCTYPE html> <html lang="en-US"> <body> <p>My First HTML Page.</p> </body> </html>

Attributes

The following are the attributes of <html> tag. Also try Global attributes.

AttributeValueExplanation
xmlnshttp://www.w3.org/1999/xhtmlSpecifies the XML namespace attribute (Optional).
langcountry_code-language_codeSpecifies the language of an element.

Deprecated Attributes

The following attributes should not be used in any case.

AttributeValueExplanation
manifestURLSpecifies the URI of a resource which contains the list of items to be cached.
versiontextSpecifies the version of the html document type definition.

Reminder

Hi Developers, we almost covered 99.5% of HTML Tutorials with examples for quick and easy learning.

We are working to cover every Single Concept in HTML.

Please do google search for:

Join Our Channel

Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.

This channel is primarily useful for Full Stack Web Developer.

Meet the Author