```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My First Web Page</title>
</head>
<body>
<header>
<h1>Welcome to My Website</h1>
</header>
<nav>
<ul>
<li><a href="#home">Home</a></li>
<li><a href="#about">About</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
</nav>
<main>
<section id="home">
<h2>Home</h2>
<p>This is the home section.</p>
</section>
<section id="about">
<h2>About</h2>
<p>This is the about section.</p>
</section>
<section id="contact">
<h2>Contact</h2>
<p>This is the contact section.</p>
</section>
</main>
<footer>
<p>© 2024 My Website</p>
</footer>
</body>
</html>
```
This structure includes:
- **`<!DOCTYPE html>`**: Declares the document type and version of HTML.
- **`<html>`**: The root element of an HTML page.
- **`<head>`**: Contains meta-information about the document, such as the character set, viewport settings, and the title.
- **`<body>`**: Contains the content of the HTML document, including headers, navigation, main content, and footers.
Check this also-How to add an image to my HTML page?
Thanks For Reading.
0 Comments