HTML <html> Tag

HTMLWeb DevelopmentFront End Technology

The <html> tag in HTML is the root of the HTML page or document and is considered as the container for all the other HTML elements.

Let us now see an example to implement the <html> tag −

Example

 Live Demo

<!DOCTYPE html>
<html>
<head>
<title>Document Title comes here</title>
</head>
<body>
<h1>
   Heading comes here
</h1>
   Content comes here
</body>
</html>

Output

In the above example, at first, we have set the doctype −

<!DOCTYPE html>

After that the <html> tag is used to set other elements inside it, including <head> −

<html>
<head>
<title>Document Title comes here</title>
</head>

Now the <body> tag is used to set the content −

<body>
<h1>

Heading comes here
</h1>
Content comes here

The <body> tag is closed and finally the HTML document ends with the closing tag −

</body>
</html>
raja
Published on 18-Jun-2019 08:02:44
Advertisements