HTML <html> tag

The <html> tag represents root of an HTML document hence also called as root element. It is a container of all elements (except <!Doctype> ) such as <body>, <head> and each element which appears in an HTML document. It tells the browser that the document is an HTML document.

Before the <html> tag we can only use <!Doctype> declaration which gives information about the HTML version to the browser.

Syntax

Following are some specifications about the HTML <html> tag

DisplayNone
Start tag/End tagBoth Start and End tag
UsageStructural

Example 1

Test it Now

Output:

HTML html tag

Attribute

AttributeValueDescription
xmlnshttp://www.w3.org/1999/xhtmlIt specifies the XML namespace for the document(Not required)
manifestURLIt specifies the URL of the resource manifest indicates resource which should be cached locally.

Global attribute

The <html> tag supports the global attributes in HTML

Event attribute

The <html> tag supports the event attributes in HTML.

Supporting Browsers

Elementchrome browser Chromeie browser IEfirefox browser Firefoxopera browser Operasafari browser Safari
<html>YesYesYesYesYes
Next TopicHTML I Tag




Latest Courses