html5网页设计作业
时间: 2023-10-22 11:13:40 浏览: 30
很高兴能够帮助你完成HTML5网页设计作业!以下是一个简单的网页设计示例,供你参考:
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>My Webpage</title>
<style>
/* CSS样式表 */
body {
background-color: #f2f2f2;
font-family: Arial, sans-serif;
}
header {
background-color: #333;
color: #fff;
padding: 20px;
text-align: center;
}
nav {
background-color: #666;
color: #fff;
overflow: hidden;
padding: 10px;
}
nav a {
color: #fff;
float: left;
font-size: 16px;
margin: 5px;
text-decoration: none;
}
nav a:hover {
background-color: #999;
}
section {
margin: 20px;
padding: 20px;
}
footer {
background-color: #333;
color: #fff;
padding: 20px;
text-align: center;
}
</style>
</head>
<body>
<header>
<h1>Welcome to My Webpage</h1>
</header>
<nav>
<a href="#">Home</a>
<a href="#">About</a>
<a href="#">Contact</a>
</nav>
<section>
<h2>About Us</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed consequat, ex sit amet ullamcorper ullamcorper, tellus nisl malesuada enim, vel fringilla enim felis at dolor. Praesent ac bibendum ligula, nec convallis lorem. Fusce quis justo id lectus tincidunt condimentum. Sed vel leo vitae leo ullamcorper pellentesque. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Phasellus vel arcu sed enim consectetur pulvinar.</p>
</section>
<section>
<h2>Contact Us</h2>
<p>123 Main Street<br>
Anytown, USA 12345<br>
Phone: 555-555-5555<br>
Email: info@mywebpage.com</p>
</section>
<footer>
<p>© 2021 My Webpage</p>
</footer>
</body>
</html>
```
这是一个基本的HTML5网页模板,包括一个页头、导航、内容区域和页脚。你可以根据自己的需要修改和添加内容,以创建你自己的网页设计作品。