【发布时间】:2016-06-16 18:31:26
【问题描述】:
我真的不明白在 HTML5 中使用标题的正确方法是什么。 例如,这段代码是否正确:
<body>
<h1>Body Heading H1</h1>
<article>
<h2>Article Heading H2</h2>
<section>
<h2>First Section Heading H2</h2>
</section>
<section>
<h2>Second Section Heading H2</h2>
</section>
</article>
</body>
在这种情况下,我可以用 H1 替换 H2 标签,文章和部分,还是只替换文章?
附:我也希望它尽可能地进行 SEO 优化
【问题讨论】:
-
技术上有效,但不是最佳实践(其他
<h2>s 可能比<h3>s 更好)。不要相信任何告诉你全力以赴的人-<h1>,因为这从未得到支持:html5doctor.com/computer-says-no-to-html5-document-outline -
谢谢你,阿德里安
标签: html seo semantic-markup html-heading