<example>

Basic HTML Structure

</example>

index.html

my-first-webpage.html

123456789101112
<!DOCTYPE html>
<html>
<head>
<title>My First Webpage</title>
</head>
<body>
<h1>Welcome to My Website</h1>
<p>This is my first webpage.</p>
</body>
</html>

Line 1

Document Type

<!DOCTYPE html> declares this as an HTML5 document, ensuring browsers render it in standard mode.

Lines 2 & 12

Root Element

The <html> tag wraps all content. It is the root of the entire document tree.

Lines 3-5

The Head

Contains metadata, title, and links to scripts/CSS. This information is not displayed directly on the page canvas.

Lines 6-11

The Body

The visible part of the document. This is where <h1> (headings) and <p> (paragraphs) live.

Code Demonstration

04 / 05