HTML Tutorial
The <html>
tag is the root element of an HTML document and encompasses all other HTML elements. It serves as the container for the entire HTML structure.
<html>
...
</html>
<html lang="en">
...
</html>
Exploring the <html>
Tag:
<!DOCTYPE html>
<html>
<head>
<title>My Website</title>
</head>
<body>
<h1>Welcome to my website!</h1>
</body>
</html>
In this example:
<html>
tag is the root element.<head>
element contains information about the document, such as the title.<body>
element contains the main content of the document.<title>
element specifies the title of the web page.<h1>
element creates a heading with the text "Welcome to my website!".<html>
tag must be the first and last element in an HTML document.lang
attribute to specify the language of the document's content.<html>
tag can be used to group elements into different languages or sections.