# 为SEO目的将\<main\>标签围绕主题内容进行包装

**URL:** <https://meta.discourse.org/t/wrapping-a-main-tag-around-topic-content-for-seo-purposes/229600>\
**Category:** Development\
**Created:** [2022年六月10日 09:51 UTC](https://meta.discourse.org/t/wrapping-a-main-tag-around-topic-content-for-seo-purposes/229600 "2022-06-10T09:51:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![JoshuaH](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/joshuah/32/209433_2.png) [@JoshuaH](https://meta.discourse.org/u/JoshuaH)\
**Post date:** [2022年六月10日 09:51 UTC](https://meta.discourse.org/t/wrapping-a-main-tag-around-topic-content-for-seo-purposes/229600/1 "2022-06-10T09:51:37Z")

</div>

Discourse 已有 `\u003cheader\u003e`、一些 `\u003cnav\u003e` 和 `\u003cfooter\u003e` 标签，这很好！但目前缺少 `\u003cmain\u003e` 标签。能否将其包裹在主要的帖子内容周围？

谢谢，  
Joshua

> **[: The Main element - HTML | MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/main)**
>
> The HTML element represents the dominant content of the of a document. The main content area consists of content that is directly related to or expands upon the central topic of a document, or the central functionality of an application.

---

<div class="post-metadata">

**Author:** ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)\
**Post date:** [2022年六月10日 13:41 UTC](https://meta.discourse.org/t/wrapping-a-main-tag-around-topic-content-for-seo-purposes/229600/2 "2022-06-10T13:41:29Z")

</div>

您是否有关于 `<main>` 标签如何影响 SEO 的参考资料？

---

<div class="post-metadata">

**Author:** ![JoshuaH](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/joshuah/32/209433_2.png) [@JoshuaH](https://meta.discourse.org/u/JoshuaH)\
**Post date:** [2022年六月14日 07:42 UTC](https://meta.discourse.org/t/wrapping-a-main-tag-around-topic-content-for-seo-purposes/229600/3 "2022-06-14T07:42:12Z")

</div>

由于 Discourse 已使用 `<header>`、`<nav>` 和 `<footer>` 标签，因此使用 `<main>` 标签来完成语义标记是有意义的。

`<main>` 标签提高了可用性，例如 Apple Reader View 就使用了它。

虽然没有确凿的证据表明它对 SEO 有直接影响，但它确实提高了可用性，可能从而带来更好的 SEO。

Google 网站站长趋势分析师 John Mueller stated the following:

> “但这确实有助于我们更好地理解页面，以便我们能在搜索中更好地展示它们以应对相应的查询。”

_来源：_ [Semantic HTML Is Not A Google Search Quality Signal](https://www.seroundtable.com/semantic-html-google-search-quality-signal-32464.html)

John Muller 另一段支持可用性方面的引述：

> **John（提交的问题）29:48**  
> 对。太棒了。我将浏览一些提交的问题，然后也会回复那些举手的人。让我们看看。我收到的第一个问题是：我是否需要用 HTML 语义元素标记我页面上的内容，例如 footer？这是否对 Google 理解内容有帮助？
> 
> **John（回答）30:07**  
> 我认为我们已经非常简短地讨论过标题。但这里本质上是相似的。对于某些类型的元素，它确实为我们提供了更多关于页面内容的上下文。但像 footer 这样的东西并没有给我们提供太多额外的信息。因此，一定程度的语义 HTML 对于 SEO 肯定是有意义的。它肯定对可用性和跨不同浏览器类型的兼容性有意义，所有这些也都是如此。但这并不一定意味着它对 SEO 很重要。

_来源：_ [Google Says Some Semantic HTML Elements Do Make Sense for SEO](https://iloveseo.com/news/google-says-some-semantic-html-elements-do-make-sense-for-seo/)
