Basic HTML Structure

1. Document Structure

An HTML document begins with the following structure:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>My HTML Page</title>
</head>
<body>
    <header>
        <h1>Welcome to HTML</h1>
    </header>
    <main>
        <p>This is a sample HTML page.</p>
    </main>
    <footer>
        <p>&copy; 2025 Web Development</p>
    </footer>
</body>
</html>

2. HTML Doctype Declaration

HTML uses a simple doctype declaration:

<!DOCTYPE html>

This ensures that the browser renders the page in standards mode.