【问题标题】:Heading order in HTML5HTML5 中的标题顺序
【发布时间】:2015-06-02 23:55:22
【问题描述】:

这是我网站的网页示例:

<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 在所有页面中,section 必须有 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>

【问题讨论】:

    标签: html seo semantic-markup


    【解决方案1】:

    这两种变体都是有效的 HTML5。

    HTML5 规范中提到了headings and sections:

    章节可以包含任何级别的标题,强烈建议作者使用适合章节嵌套级别的标题。

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

    HTML5 does not 定义 h1 比 h6 更“重要”。
    消费者(如搜索引擎)如何解释这一点取决于他们自己,而且很可能因消费者而异,因此您必须查看他们的文档。

    【讨论】:

    • 需要明确的是,h1 的排名高于 h6。这可能与“重要”的含义不同,但我不这么认为。
    【解决方案2】:

    使用您的第二个概念,根据 SEO,它看起来既简单又好。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-12-12
      • 2012-01-10
      • 2012-02-16
      • 1970-01-01
      • 2016-10-11
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多