Here’s a simple overview of HTML structure, along with a brief introduction:
What is HTML?
HTML (HyperText Markup Language) is the foundation of web pages—it structures content with elements and tags. Browsers interpret HTML to display text, images, links, and interactive elements.
Basic HTML Structure
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>My First HTML Page</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="styles.css">
</head>
<body>
<header>
<h1>Welcome to My Page</h1>
</header>
<nav>
<a href="#">Home</a> |
<a href="#">About</a> |
<a href="#">Contact</a>
</nav>
<main>
<section>
<h2>Introduction</h2>
<p>This is a basic HTML page structure. It includes headers, navigation, and content sections.</p>
</section>
</main>
<footer>
<p>© 2025 My Website</p>
</footer>
</body>
</html>
Key Components Explained
- <!DOCTYPE html> → Declares the document as modern HTML5.
- <html> → The root element of an HTML page.
- <head> → Contains metadata (title, styles, responsive settings).
- <body> → Holds the visible content of the page.
- <header> → Typically contains the site title or branding.
- <nav> → Defines navigation links.
- <main> → Main content container.
- <footer> → Footer section (copyright, extra links).
Would you like to add styling or JavaScript functionality to this structure next? Let me know how you’d like to expand!