完整html网页代码案例
时间: 2023-11-12 16:21:17 浏览: 90
<!DOCTYPE html>
<html>
<head>
<title>My Webpage</title>
</head>
<body>
<header>
<h1>Welcome to My Webpage</h1>
<nav>
<ul>
<li><a href="#about">About</a></li>
<li><a href="#services">Services</a></li>
<li><a href="#portfolio">Portfolio</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
</nav>
</header>
<main>
<section id="about">
<h2>About Us</h2>
<p>We are a web development company specializing in creating responsive and user-friendly websites.</p>
</section>
<section id="services">
<h2>Our Services</h2>
<ul>
<li>Web Design</li>
<li>Web Development</li>
<li>Search Engine Optimization</li>
<li>Social Media Marketing</li>
</ul>
</section>
<section id="portfolio">
<h2>Our Portfolio</h2>
<img src="images/project1.jpg" alt="Project 1">
<img src="images/project2.jpg" alt="Project 2">
<img src="images/project3.jpg" alt="Project 3">
</section>
<section id="contact">
<h2>Contact Us</h2>
<form>
<label for="name">Name:</label>
<input type="text" id="name" name="name"><br><br>
<label for="email">Email:</label>
<input type="email" id="email" name="email"><br><br>
<label for="message">Message:</label>
<textarea id="message" name="message"></textarea><br><br>
<input type="submit" value="Submit">
</form>
</section>
</main>
<footer>
<p>© 2021 MyWebpage.com</p>
</footer>
</body>
</html>