Skip to content
Prime SEO Tools

Structured data

FAQ Accordion Builder

Generate accessible, JavaScript-free FAQ accordion HTML together with matching FAQPage structured data.

Runs locally. Nothing you enter is sent to a server.

Questions
Q1
Q2
Q3
Live preview
Frequently asked questions
How long does shipping take?

Orders ship within 1–2 business days. Standard delivery takes 3–5 business days after that.

Can I change or cancel my order?

Yes, as long as it hasn't shipped. Reply to your confirmation email and we'll update it.

Do you offer refunds?

We offer a full refund within 30 days of delivery for unused items in their original packaging.

Code
<style>
.faq { max-width: 720px; }
.faq details { border-bottom: 1px solid #e5e5e5; padding: 16px 0; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 400; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 10px 0 0; line-height: 1.6; color: #444; }
</style>
<section class="faq">
  <h2>Frequently asked questions</h2>
  <details open>
    <summary>How long does shipping take?</summary>
    <p>Orders ship within 1–2 business days. Standard delivery takes 3–5 business days after that.</p>
  </details>
  <details>
    <summary>Can I change or cancel my order?</summary>
    <p>Yes, as long as it hasn't shipped. Reply to your confirmation email and we'll update it.</p>
  </details>
  <details>
    <summary>Do you offer refunds?</summary>
    <p>We offer a full refund within 30 days of delivery for unused items in their original packaging.</p>
  </details>
</section>

Accessible by default

The generated markup uses the native <details> element. It opens and closes with a click, Enter or Space, announces its state to screen readers and needs no JavaScript. The optional CSS adds a plus/close icon and spacing, and is small enough to inline.

How to add it to your page

  1. Write your questions and answers. Each new line in an answer becomes its own paragraph.
  2. Copy the HTML into your page or CMS (use an HTML or Custom HTML block).
  3. Keep the JSON-LD block alongside it, or paste it into the page's head.

Frequently asked questions

Why use <details> and <summary>?

They're native HTML, so the accordion works without JavaScript, is keyboard and screen-reader accessible by default, and the answers are still in the HTML for search engines to read.

Will Google index text inside a collapsed accordion?

Yes. Content in collapsed <details> elements is in the HTML and Google indexes it. With mobile-first indexing it's treated with full weight.

Does the schema have to match the visible text?

Yes. Google's guidelines require FAQ structured data to match questions and answers that users can see on the page. This tool builds both from the same input, so they always match.

Can I style it to match my site?

Yes. Turn off the included CSS and target .faq, details and summary in your own stylesheet.