HTML html Tag

The <html> tag is used to represent the root of an HTML document. It is a container of all elements (except for the <!DOCTYPE> tag). It tells the browser that it is an HTML document.

Syntax

<html>Elements...</html>

Example

<!DOCTYPE html> 
<html>
   <head>
      <title>HTML tag</title>
   </head>
   <body>
      <h2>HTML tag example</h2>
      <p>Your Content.</p>
   </body>
</html>

Output:

 html tag

Attributes

Attribute Value Description
xmlns http://www.w3.org/1999/xhtml Specifies the XML namespace for the document.

Global Attributes

The <html> tag supports all the Global Attributes in HTML.

Supported Browsers

Element Chrome Firefox IE Opera Safari
<html> Yes Yes Yes Yes Yes

Leave a Comment

Your email address will not be published.