English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML Reference Manual

HTML Tag Reference

HTML: <html> tag

HTML: <html> tag is the container for all other HTML elements. This tag is also commonly referred to as the <html> element.

Online Example

Simple HTML5 Document:

<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>HTML5 Usage of <html> tag (Basic Tutorial Website oldtoolbag.com)</title>/title>
</head>
<body>
<h1>Heading</h1>
<p>This is the content.</p>/p>
</body>
</html>
Test to see ‹/›

In this HTML5In the document example, the first line has the <!DOCTYPE> tag, which is not included within the <html> tag.
Next is the <html> tag, which is the container for the other HTML tags. The <html> tag contains2parts-<head> tag and <body> tag. <head> tag contains <meta> tag and <title> tag. <body> tag contains <h1> tag and <p> tag.

Browser Compatibility

IEFirefoxOperaChromeSafari

All major browsers support the <html> tag.

Definition and Usage

<html> tag informs the browser that this is an HTML document.

<html> tag is the outermost element in an HTML document.

<html> tag is the container for all other HTML elements (except <!DOCTYPE> tag) container.

HTML 4.01 and HTML5differences

HTML5 In, a new attribute has been added: manifest.

Differences between HTML and XHTML

The xmlns attribute is required in XHTML but not in HTML.

However, even if the <html> in the XHTML document does not use the xmlns attribute, W3The HTML validator on C will not report an error. This is because "xmlns=http://www.w3.org/1999/"xhtml" is a fixed value, even if you do not include it, this value will be added to the <html> tag.

Attribute

New: HTML5 new attributes.

AttributeValueDescription
manifestHTML5URLDefines a URL where the cache information of the document is described.
xmlnshttp://www.w3.org/1999/xhtmlHTML does not support. Only XHTML supports. Specifies the XML namespace attribute (use this attribute if you need your content to be valid XHTML).

Global attributes

The <html> tag supports Global attributes of HTML.