The <html> tag represents root of an HTML document hence also called as root element. It is a container of all elements (except <!Doctype> ) such as <body>, <head> and each element which appears in an HTML document. It tells the browser that the document is an HTML document.

Before the <html> tag we can only use <!Doctype> declaration which gives information about the HTML version to the browser.

Syntax

<html>....</html>   

Following are some specifications about the HTML <html> tag

DisplayNone
Start tag/End tagBoth Start and End tag
UsageStructural

Example 1

<!DOCTYPE html>  

<html>  

<head>  

<title>HTML tag</title>  

</head>  

<body>  

<h2>Example of HTML tag</h2>  

<p> Write your main Content within Body of the HTML document. </p>  

</body>  

</html>

Output:

HTML html tag

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *