19
loading...
This website collects cookies to deliver better user experience
<section>
<h2>FAQ</h2>
<!-- Question 1 -->
<div>
<h3>Question goes here</h3>
<!-- Answer to question 1 -->
<div>
<p>The answer goes here</p>
</div>
</div>
<!-- Question 2 -->
<div>
<h3>Second question goes here</h3>
<!-- Answer to question 2 -->
<div>
<p>The second answer goes here</p>
</div>
</div>
</section>
FAQPage
to the section, Question
to the question elements and Answer
to the answers:<section itemscope itemtype="https://schema.org/FAQPage">
<h2>FAQ</h2>
<!-- Question 1 -->
<div itemscope itemtype="https://schema.org/Question">
<h3>Question goes here</h3>
<!-- Answer to question 1 -->
<div itemscope itemtype="https://schema.org/Answer">
<p>The answer goes here</p>
</div>
</div>
<!-- Question 2 -->
<div itemscope itemtype="https://schema.org/Question">
<h3>Second question goes here</h3>
<!-- Answer to question 2 -->
<div itemscope itemtype="https://schema.org/Answer">
<p>The second answer goes here</p>
</div>
</div>
</section>
itemprop="name"
Attribute. Same thing for acceptedAnswer
, the question itself (mainEntity
) and the text content of the answer (text
):<section itemscope itemtype="https://schema.org/FAQPage">
<h2>FAQ</h2>
<!-- Question 1 -->
<div itemscope itemtype="https://schema.org/Question" itemprop="mainEntity">
<h3 itemprop="name">Question goes here</h3>
<!-- Answer to question 1 -->
<div itemscope itemtype="https://schema.org/Answer" itemprop="acceptedAnswer">
<p itemprop="text">The answer goes here</p>
</div>
</div>
<!-- Question 2 -->
<div itemscope itemtype="https://schema.org/Question" itemprop="mainEntity">
<h3 itemprop="name">Second question goes here</h3>
<!-- Answer to question 2 -->
<div itemscope itemtype="https://schema.org/Answer" itemprop="acceptedAnswer">
<p itemprop="text">The second answer goes here</p>
</div>
</div>
</section>
Live-Demo: https://linus.link/dev-to/google-faq.html