HTML <html> Tag


The <html> HTML element is a container that encloses the entire contents of a web page, including the <head> and <body> elements. The opening and closing <html> tags in the document are optional, but a good style dictates their indispensable use. As a rule, <html> comes second in the document, after determining the type of document (Document Type Definition, DTD) set via <!DOCTYPE> . The closing <html> tag is always the last in the document.


Permitted Parents
None. This is the root element of a document.
<head> and <body>
Start/End Tags
Start tag: optional, End tag: optional


<title>Title of the document</title>
The content of the document......


Attribute Definition
version Specifies the HTML DTD version of the document. The version attribute is deprecated - use the <!DOCTYPE> tag instead.
content Specifies the property's value.
scheme Specifies a scheme to use to interpret the property's value (as declared in the content attribute).
http-equiv Used for http response message headers. For example http-equiv can be used to refresh the page or to set a cookie. Values include content-type, expires, refresh and set-cookie.

Global Attributes

The <html> tag also supports the Global Attributes in HTML5

Event Attributes

The <html> tag also supports the Event Attributes in HTML5

Browser Support

Explorer Edge Chrome Firefox Opera Safari
Tablets / Mobile
Android Chrome Firefox Opera Safari Samsung

Last updated by CSSPortal on: 6th December 2019