Loading...
Loading...
00:00:00

Root element tag <html>

The HTML root element is the top-level element in an HTML document. It is used to define the structure of the document and contains all of the other elements that make up the page. The root element is represented by the tag, and is the first element in an HTML document.

The root element has two main components: the head and the body. The head of the document, represented by the tag, contains information about the document, such as the title of the page, meta information, and links to external resources such as stylesheets and scripts. The body of the document, represented by the tag, contains the main content of the page, including text, images, links, and other elements.

<!DOCTYPE html>
<html lang="en"> <!-- root element starts -->
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
   

</body>
</html>  <!-- root element ends -->

In this example, the tag is the root element and contains the head and body sections of the document. The head section includes the character encoding and title of the page, while the body section includes the main content of the page.

It is important to note that the structure of an HTML document must be properly nested, with the root element containing all other elements in the document. This ensures that the document is well-formed and can be correctly parsed and displayed by web browsers.