Schema.org for the FAQ page

怎甘沉沦 提交于 2019-12-05 21:43:59

FAQPage will be the best type for the page. If you don’t want to use it until it’s released, WebPage is the best alternative. You could also consider using both types for now, and remove WebPage as soon as FAQPage is part of the core vocabulary (or remove FAQPage if it goes to the attic):

<main itemscope itemtype="http://schema.org/WebPage http://schema.org/FAQPage">

I wouldn’t use the mainContentOfPage property. It expects a WebPageElement, which is typically not useful.

In your case, the Question items aren’t connected to the WebPage item. For this, you could use the hasPart property.

<main itemscope itemtype="http://schema.org/WebPage http://schema.org/FAQPage">

  <section>

    <h2 itemprop="name">Frequently Asked Questions</h2>

    <article itemprop="hasPart" itemscope itemtype="http://schema.org/Question"></article>
    <article itemprop="hasPart" itemscope itemtype="http://schema.org/Question"></article>
    <article itemprop="hasPart" itemscope itemtype="http://schema.org/Question"></article>

  </section>

</main>

(I switched the article and section elements because I think it makes more sense that way, semantically.)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!