An HTML document consists of elements that provide structure and meaning to a webpage. Every HTML page has basic components:
Specifies the HTML version.
html:
<!DOCTYPE html>
Wraps the entire webpage.
html:
<html>
<!-- Content goes here -->
</html>
Contains meta-information about the page, such as the title and links to stylesheets.
html:
<head>
<meta charset="UTF-8">
<title>My First Webpage</title>
</head>
Contains the content visible on the webpage.
html:
<body>
<h1>Welcome to My Webpage</h1>
<p>This is a paragraph.</p>
</body>