HTML5 中的标题顺序

Heading order in HTML5

这是我网站的网页示例:

<html>

<title> artilce header </title>

<body>
    <header> <h1> nme of website</h1></header>

    <section>
        <h2> name of section</h2>

        <article>
            <h3>article header</h3>

        </article>
    </section>
</body>
</html>

我想知道这个顺序是否正确?或者它可能对 SEO 有不良影响?

header 在所有页面中,部分必须有一个 header 因为 header/...

比如我是不是要改成这样:

<html>

<title> artilce header </title>

<body>
    <header> <h2> nme of website</h2></header>

    <section>
        <h3> name of section</h3>

        <article>
            <h1>article header</h1>

        </article>
    </section>
</body>
</html>

使用您的第二个概念,它看起来简单且符合 SEO 的要求。

两种变体都有效 HTML5。

HTML5 规范说 headings and sections:

Sections may contain headings of any rank, and authors are strongly encouraged to use headings of the appropriate rank for the section's nesting level.

所以你的第一个例子是HTML5推荐的。

HTML5 does not 定义 h1h6.
多 "important" 消费者(如搜索引擎)如何解释这取决于他们,并且很可能因消费者而异,因此您必须检查他们的文档。