HTML5部分标题

时间:2012-03-12 08:09:29

标签: html5 header

说我的页面上有一段内容,即:

标题1
一些内容

使用HTML5表示此问题的最佳方式是什么?

<section>
    <header>
        <h1>Heading 1</h1>
    </header>
    <p>Some content</p>
</section>

或者它会是:

<section>
    <h1>Heading 1</h1>
    <p>Some content</p>
</section>

我想我在这里是否需要标头标签或者它是多余的我有点困惑。我一直在阅读规范,我没有看到任何解决这个问题。

1 个答案:

答案 0 :(得分:3)

<header>是为了取代传统的<div id="header"> - the usual place for banners, logos and stuff above the website..

在您的情况下,您的“标题”更多是以下内容的标题。标题+段落对适用于此。

<section>
    <h1>Heading 1</h1>
    <p>Some content</p>
</section>
相关问题