header footer nav标签的使用:
[color=red]标签是为了最好的表达内容的,所以最好使用有语义的header footer nav等[/color]
<!DOCTYPE html>
<html lang="en">
<head>
<title>XHTML Doctype</title>
<meta charset="utf-8"/>
<style>
h1 {
margin-top: 0;
color: red;
}
div[role="main"] {
color: black;
}
</style>
</head>
<body>
<header>
<h1>My First Website</h1>
<!-- marker up是为了最好的表达内容的-->
<nav>
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Contact</a></li>
<li><a href="#">Rss</a></li>
</ul>
</nav>
</header>
<div role="main">
<p>Here is the main context!</p>
</div>
<footer>
<p>Copyright here</p>
</footer>
<h1>Hi there</h1>
<script>
alert("hi there");
</script>
</body>
</html>
[color=red]标签是为了最好的表达内容的,所以最好使用有语义的header footer nav等[/color]