是一个很好的做法把<header>
标签内的<section>
之一? 我知道它在<header>
,<article>
,<aside>
,<footer>
内是正确的。标签标头内的部分
<section>
已用于分隔我们网页的不同主题,而且我们经常可能会发现<article>
(可能与它们的<header>
)。然后我怀疑使用<header>
标签到<section>
的正确性。
例如,
<body>
<header>
<hgroup>
<h1>hello</h1>
<h2>world</h2>
</hgroup>
</header>
<section>
<header>Total news</header>
<article>
<header><h1>News</h1></header>
<section>
<header>Daily news</header>
<article>
<header><h2>News 1 title</h2></header>
<p>news 1</p>
</article>
<article>
<header><h2>News 2 title</h2></header>
<p>news 2</p>
</article>
</section>
</article>
</section>
<section>
<header><h1>Another section</h1></header>
<article>
<p>Content of another section</p>
</article>
</section>
<footer>
<p>Copyright</p>
</footer>
</body>
HTML5标签旨在让搜索引擎更轻松地浏览初学者的内容。不要看到一个部分作为包装,因为这是我在你的内容中看到的。我认为应该避免使用标题,但那是我的看法。查看本网站获取更多信息。 http://html5doctor.com/avoiding-common-html5-mistakes/ – Dorvalla