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

W3Q*_*W3Q 4 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>
Run Code Online (Sandbox Code Playgroud)

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

谢谢!!

Dai*_*Dai 12

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

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

内容模型:流内容,但没有页眉,页脚或主要元素后代.

所述specifiction定义"流内容"(3.2.4.1.2)的部分列出所有的"流"的元素,其中列出<section>.

因此,因此,你的HTML是有效的:<section>可以的后裔<footer>,但是<header>,<footer><main>不能.