HTML <html> Tag

The <html> element is used to give information to the browsers that it is an HTML document. This element represents the root of an HTML document.

The <html> element is the first HTML element in an HTML document (however, it must be preceded by a <!DOCTYPE>).

Any other HTML elements are placed inside the <html> element.

The first tag inside a <html> element must be a <head> tag, followed by a <body> tag.

Syntax

The <html> element comes in pairs. The content must be written between opening (<html>) and closing (</html>) elements.

Example

<!DOCTYPE html>
<html>
   <head>
      <title>We place here document title.</title>
   </head>
   <body>
     <p>This is a paragraph for example.</p>
   </body>
</html>

Attributes

These attributes came along with HTML5.

Attribute Value Description
manifest URL Defines document's cache manifest's address for offline browsing.
xmlns https://www.w3.org/1999/xhtml Defines the ML namespace attribute.

The <html> element also supports the Global Attributes.