text.html 1.6 KB
Newer Older
ToTensor's avatar
ToTensor 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
 
<p class="zw">页面的标志区域或报头可以用<code>header</code>元素来描述,通常这些标题放在页面的顶端,当然也可以放在底部或者其他地方。我们用一个更合适的<code>header</code>元素来替换经典的banner。</p> 
<pre class="代码无行号"><code><header> 
   <h1>It's Hardboiled</h1> 
</header></code></pre> 
<p class="zw">我们可以在<code>section</code>或者<code>article</code>里面添加<code>header</code>元素,而且在页面里面可以有多个<code>header</code>。这意味着我们有多种使用<code>header</code>的方式:作为整页的标志;作为介绍<code>section</code><code>article</code>区域的引言,或者二者混合使用。</p> 
<p class="zw">下面我们试试在<code>article</code>中加上“本书作者”的<code>header</code>描述。</p> 
<pre class="代码无行号"><code><article> 
   <header> 
      <h1>Hardboiled authors</h1> 
   </header> 

   <section id="chandler"> 
      <header> 
            <h1>Raymond Chandler</h1> 
      </header> 
   </section> 

      <section id="dashiell-hammett"> 
            <header> 
                  <h1>Dashiell Hammett</h1> 
            </header> 
      </section> 

      <section id="mickey-spillane"> 
            <header> 
                  <h1>Mickey Spillane</h1> 
            </header> 
      </section> 
</article></code></pre> 
<p class="zw">这个规范将<code>header</code>元素描述成“导航辅助或一组引导的容器”。让我们可以自由地包含搜索表单、时间日历组件。页面或者段落都将以此开始。</p>