【发布时间】:2021-05-30 21:52:49
【问题描述】:
我在特定页面上有以下结构和内容:
<header>
// Logo
// Site navigation
</header>
<main>
<article>
<section>
// Hero image or video block
</section>
<section>
// Here all kinds of paragraphs are rendered (e.g: Call to action, related video's block to this page, related actors block related to this page etc.
// All those blocks has their own <section> tag
</section>
</article>
</main>
所以在上面的例子中 <article> 我有 2 个 <section> 标签,然后在第二个 <section> 我有更多 <section> 标签嵌套。这是正确的做法吗?
【问题讨论】:
-
嵌套部分元素是完全可以接受的,但是您需要确保这样做是有意义的。
标签: html semantics semantic-markup