Please note, this is a STATIC archive of website www.tutorialrepublic.com from 10 Sep 2022, cach3.com does not collect or store any user information, there is no "phishing" involved.
HTML Tags
Advertisements

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:

HTML / XHTML: <html> ... </html>

The example below shows the <html> tag in action.

<!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.

Browsers Icon

Basic Support—

  • Firefox 1+
  • Google Chrome 1+
  • Internet Explorer 2+
  • Apple Safari 1+
  • Opera 2.1+

Further Reading

See tutorial on: HTML Get Started.

Related tag: <head>, <body>.

Advertisements
Bootstrap UI Design Templates