问题原文
原帖链接 · Fong-Wan Chau · CC BY-SA 3.0
Background
In term of SEO, <h1> should be used as page specific content only and we should avoid to use it for site logotype. So, a current homepage structure should be something like:
<body>
<header>
<p><img id="logo">
<nav>
<ul></ul>
</nav>
</header>
<main>
<h1>Homepage</h1>
<!-- Content -->
</main>
<footer>
<nav>
<ul></ul>
</nav>
<p>Copyright
</footer>
But the above code gave this outline in HTML5 outliner:
- Homepage
- Untitled Section (nav)
- Untitled Section (nav)
The problem
Since <nav> is sectioning content, should we avoid the use of that for global navigation because logically it is not in-page navigation?
已采纳解答
原帖链接 · marcanuy · CC BY-SA 3.0
In html5 the nav element should be used to represent a section of a page that links to
- other pages or
- to parts within the page
So depending what kind of links you are specifying in the footer section you might avoid inserting them within a nav element:
Not all groups of links on a page need to be in a nav element — the element is primarily intended for sections that consist of major navigation blocks. In particular, it is common for footers to have a short list of links to various pages of a site, such as the terms of service, the home page, and a copyright page. The footer element alone is sufficient for such cases; while a nav element can be used in such cases, it is usually unnecessary
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
