通過建立一個描述MyPetShop網站信息來熟悉常用的XHTML5元素。
代碼:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<meta name="keywords" content="MyPetShop,XHTML5" />
<style type="text/css">
aside {
float:left;
width:15%;
}
section {
float:left;
width:84%;
}
footer {
clear:both ;}
</style>
</head>
<body>
<header>
<img alt="MyPetSHOP" src="I:\Images\logo.gif" />
</header>
<aside>
<nav style="background-color:#C0C0Co">
<a href="HTML5.html">介紹</a><br />
<a href="HTML5.html"> 數據庫設計</a>
</nav>
</aside>
<section>
<h3>MyPetShop</h3>
<article>
MyPetShop是本書提供的一個綜合實例,用來展示ASP.NET 4.5網站開發技術.
</article>
<article>
<h4>功能</h4>
MyPetShop包括前臺商品瀏覽,用戶管理,購物車,訂單結算和後臺管理等模塊。
</article>
</section>
<footer style="background-color:#C0C0C0">Copyright 2014 MyPetShop </footer>
</body>
</html>
運行效果