在 html5 中,您可以在页脚中添加 <h1>

In html5 can you have an <h1> in a footer

我找遍了所有地方,但还没有找到任何可以具体回答这个问题的内容:在 html5 中,在页脚内放置一个 h1 标签在语义上是否可行?我知道您现在可以在一个文档中有多个 h1,但我正在处理一个涉及带标题的页脚的项目,并且关于这是否是语义的存在一些争论。

从语义上讲,这会非常糟糕,因为 H1 代表一个部分或其他内容的 header。为盲人用户想象一下。这里有一个讨论:

http://moz.com/community/q/h1-tag-in-the-footer

footerh1 标签没有什么相互排斥的。事实上,您甚至可以有多个页脚。

看看 W3C HTML footer 的标准最后一个代码示例:它包含 h1 里面的一个:

Some site designs have what is sometimes referred to as "fat footers" — footers that contain a lot of material, including images, links to other articles, links to pages for sending feedback, special offers... in some ways, a whole "front page" in the footer.

This fragment shows the bottom of a page on a site with a "fat footer":

...
 <footer>
  <nav>
   <section>
    <h1>Articles</h1>
    ...

应该注意的是,在您的示例和 link 中,页脚中的 h1 始终包含在 <section></section> 标记内。

<section> 也可以拥有自己的自包含内容块

<header>
    <!-- nav/logo/etc -->
</header>
<main>
    <!-- article/content/section/etc -->
</main>
<footer>
    <!-- nav/links/section/etc... -->
    <section>
        <h1></h1> <!-- h1 in a NEW section -->
    </section>
</footer>