totn HTML

HTML: <html> tag

This HTML tutorial explains how to use the HTML element called the <html> tag with syntax and examples.

Description

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

Syntax

In HTML, the syntax for the <html> tag is:

<html>
</html>

Attributes

In addition to the Global Attributes, the following is a list of attributes that are specific to the <html> tag:

Attribute Description HTML Compatibility
manifest URIs of a resource manifest HTML5 (Gecko 1.9)
version Version of the HTML Document type definition Depreciated in HTML 4.01, Obsolete in HTML5

Note

Browser Compatibility

The <html> tag has basic support with the following browsers:

  • Chrome
  • Android
  • Firefox (Gecko)
  • Firefox Mobile (Gecko)
  • Internet Explorer (IE)
  • Edge Mobile
  • Opera
  • Opera Mobile
  • Safari (WebKit)
  • Safari Mobile

Example

We will discuss the <html> tag below, exploring examples of how to use the <html> tag in HTML5, HTML 4.01 Transitional, XHTML 1.0 Transitional, XHTML 1.0 Strict, and XHTML 1.1.