Description
The <html> tag is the root of any HTML document. It wraps all the content on the entire page, including the <head> and <body> tags. Everything you write for a webpage goes inside the <html> element.
Syntax:
<html>
<!-- head and body go here -->
</html>Attributes:
| Attribute | Description |
|---|---|
| lang | Specifies the language of the document (e.g., en, fr, es) |
Example:
<html lang="en">
<head>
<title>My First Webpage</title>
</head>
<body>
<h1>Hello World!</h1>
</body>
</html>
Try It Yourself
Notes:
- The
<html>tag must be the top-most element. - Always include the
langattribute to help screen readers and SEO tools. - It is best practice to follow the proper HTML document structure:
<!DOCTYPE html>
<html>
<head>...</head>
<body>...</body>
</html>

