在HTML5中的页脚标记中是否可以使用节标记?

时间:2014-09-20 04:02:43

标签: html html5

我是HTML5标记的新手。

我想知道我是否可以在下面的页脚中添加章节标记。

<article>
    <header class="content__header">
    </header>

    <section class="content__body">
    </section>

    <footer class="content__footer>
        <section class="relatedArticles">
        </section>
        <section class="pagination">
        </section>
    </footer>

</article>

w3c文档没有解释有关页脚标记的使用情况。

谢谢!

1 个答案:

答案 0 :(得分:12)

  

w3c文档并未解释有关页脚标记使用情况的详细信息。

......实际上,确实如此。第4.3.8节<footer>http://www.w3.org/TR/html5/sections.html#the-footer-element)声明:

  

内容模型:Flow content,但没有页眉,页脚或主要元素后代。

The section of the specifiction defining "Flow content" (3.2.4.1.2) lists all "flow" elements,其中列出了<section>

因此,您的HTML有效:<section>可以是<footer>的后代,但<header><footer><main>不能。{/ p>

相关问题