The FAQ Masterclass
How do we represent questions and answers in a way that serves both the human reader and the machine crawler? In this guide, we explore the hierarchy of FAQ construction.
The Structural Foundation
Before implementing complex widgets, your page must follow a logical heading hierarchy. This acts as the "Table of Contents" for screen readers.
<h1>Support Center</h1>
<h2>Frequently Asked Questions</h2>
<h3>General Inquiries</h3>
Main Method: The Interactive Accordion
The <details> and <summary> tags are the most powerful native tools for FAQs. They create a "click-to-reveal" interaction without a single line of JavaScript.
What is the benefit of using <summary>?
<details>
<summary>
What is HTML5?
<svg>...</svg>
</summary>
<p>HTML5 is the latest standard...</p>
</details>
The Semantic List
For FAQs where all answers should be visible immediately, use the <dl> (Description List).
<dl>
<dt>How do I reset my password?</dt>
<dd>Click the "Forgot Password" link on the login page.</dd>
</dl>
Deep Dive: SEO Option B (Microdata)
While JSON-LD is popular, Microdata allows you to embed your SEO information directly into your visible HTML elements. Here is a complete expanded example of Option B.
<!-- Option B: Microdata Container -->
<div itemscope itemtype="https://schema.org/FAQPage">
<!-- Question Entity -->
<div itemscope itemprop="mainEntity" itemtype="https://schema.org/Question">
<h3 itemprop="name">How many h1 tags can I use?</h3>
<!-- Answer Entity -->
<div itemscope itemprop="acceptedAnswer" itemtype="https://schema.org/Answer">
<div itemprop="text">
Best practice is one h1 per page to define the primary topic.
</div>
</div>
</div>
</div>
Choosing Your Method
| Method | Best For... | Interactivity |
|---|---|---|
| <dl> | Simplicity/Standard Lists | Static |
| <details> | User Experience/Clean UI | Interactive (Native) |
| Schema (B) | Google Search Rich Results | Invisible (SEO) |
The Bottom Line
Structure your page with headings first. Choose <dl> for accessibility, <details> for the modern "summary" accordion, and combine them with Microdata (Option B) to ensure search engines reward your hard work with Rich Snippets.
No comments:
Post a Comment