減少使用div class布局 不要濫用html標簽div
使用html5語義化標簽 W3C標準 <main>一個頁面一次只能顯示一個
<header>, <main>, <footer>和<section>
<article>
<header>
<h1>Why you should buy more cheeses than you currently do</h1>
</header>
<section>
<header>
<h2>Part 1: Variety is spicy</h2>
</header>
<!-- 內容 -->
</section>
<section>
<header>
<h2>Part 2: Cows are great</h2>
</header>
<!-- 更多內容 -->
</section>
</article>
導航欄 一目了然而不需要在<div>上讀物和處理類名來找到它凤薛,更重要的是機器也可以找到它
<nav>
<a href="/">Home</a>
<a href="/about">About</a>
<a href="/archive">Archive</a>
</nav>
<address> 元素旨在調出聯(lián)系信息训唱,它通常在主頁<footer>中用于標記企業(yè)的郵寄地址谣蠢,電話號碼,客戶服務郵箱地址等等矢炼。
<footer>
<section class="contact" vocab="http://schema.org/" typeof="LocalBusiness">
<h2>Contact us!</h2>
<address property="email">
<a href="mailto:us@example.com">us@example.com</a>
</address>
<address property="address" typeof="PostalAddress">
<p property="streetAddress">123 Main St., Suite 404</p>
<p>
<span property="addressLocality">Yourtown</span>,
<span property="addressRegion">AK</span>,
<span property="postalCode">12345</span>
</p>
<p property="addressCountry">United States of America</p>
</address>
</section>
</footer>
<aside>
<blockquote>
<cite>
code
<data>
<del>
<figure>
<ins>
<time>
-
<var>
可讀性高100倍,搜索引擎優(yōu)化和可訪問性目的而言,其效率將提高100倍酷麦。
<header>
<h1>Super duper best blog ever</h1>
<nav>
<a href="/">Home</a>
<a href="/about">About</a>
<a href="/archive">Archive</a>
</nav>
</header>
<main>
<article>
<header>
<h1>Why you should buy more cheeses than you currently do</h1>
</header>
<section>
<header>
<h2>Part 1: Variety is spicy</h2>
</header>
<!-- cheesy content -->
</section>
<section>
<header>
<h2>Part 2: Cows are great</h2>
</header>
<!-- more cheesy content -->
</section>
</article>
</main>
<footer>
<section class="contact" vocab="http://schema.org/" typeof="LocalBusiness">
<h2>Contact us!</h2>
<address property="email">
<a href="mailto:us@example.com">us@example.com</a>
</address>
<address property="address" typeof="PostalAddress">
<p property="streetAddress">123 Main St., Suite 404</p>
<p>
<span property="addressLocality">Yourtown</span>,
<span property="addressRegion">AK</span>,
<span property="postalCode">12345</span>
</p>
<p property="addressCountry">United States of America</p>
</address>
</section>
</footer>