HTML <html>
Tag
Topic: HTML5 Tags ReferencePrev|Next
Description
The <html>
element defines the root of HTML and XHTML documents. It is the outer container for everything that appears in an HTML (or XHTML) document except <!DOCTYPE>
. A typical HTML document has this structure: See Example.
The following table summarizes the usages context and the version history of this tag.
Parent: | None |
---|---|
Content: | <head> and <body> |
Start/End Tag: | Start tag: optional, End tag: optional |
Version: | HTML 2, 3.2, 4, 4.01, 5 |
Syntax
The basic syntax of the <html>
tag is given with:
The example below shows the <html>
tag in action.
Example
Try this code »<!DOCTYPE html>
<html lang="en">
<head>
<title><!--Document title--></title>
</head>
<body>
<!--Document body-->
</body>
</html>
Tag-Specific Attributes
The following table shows the attributes that are specific to the <html>
tag.
Attribute | Value | Description |
---|---|---|
manifest |
URL | Specifies the URL of the document's cache manifest (for offline application). |
xmlns |
http://www.w3.org/1999/xhtml |
XHTML only. Specifies the URL of the default XML namespace for a document. |
version |
DTD | Obsolete Specifies which HTML DTD version governs the current document. |
Global Attributes
Like all other HTML tags, the <html>
tag supports the global attributes in HTML5.
Event Attributes
The <html>
tag also supports the event attributes in HTML5.
Browser Compatibility
The <html>
tag is supported in all major modern browsers.
Basic Support—
|
Further Reading
See tutorial on: HTML Get Started.