Guides tab and accordion implementation for organizing content without excessive vertical space. Two layout patterns: vertical accordion (FAQ-style, stacked) and horizontal tabs (how-to style, side-by-side). Both improve UX by reducing scroll; SEO impact depends on implementation and content placement.
When invoking: On first use, if helpful, open with 1–2 sentences on what this skill covers and why it matters, then provide the main output. On subsequent use or when the user asks to skip, go directly to the main output.
PatternLayoutBest forExampleVertical accordionStacked; expand/collapse one at a timeFAQ, Q&A, long lists, objection handling"How do I return?" → answer belowHorizontal tabsSide-by-side labels; one panel visibleHow-to steps, product specs, pricing tiers, comparisons"Step 1 | Step 2 | Step 3"
Mobile: Vertical accordion works well on small screens (natural scroll). Horizontal tabs can feel cramped—consider accordion, dropdown, or full-width tab bar that scrolls.
Google's position: Google indexes and ranks content inside tabs and accordions fully; hidden content receives full weight (confirmed since 2016 mobile-first indexing). Gary Illyes: "we index the content, its weight is fully considered for ranking."
Practical nuance: Some tests show always-visible content outperforms hidden content in rankings. Reserve tabs/accordions for secondary content; place primary, keyword-critical content in visible areas.
Content typePlacementPrimary / ranking-focusedVisible above fold; not hiddenSecondary / supportingTabs, accordions acceptableFAQ answersAccordion OK; first item expanded by default; see faq-page-generator
Content must be in the DOM on page load. Google does not simulate user clicks; it cannot "click" tabs to discover content.
ImplementationIndexed?All tab content in HTML at load✅ YesContent loaded via AJAX on tab click❌ No
Recommendation: Server-render all tab content in the initial HTML; use CSS/JS only to show/hide. Prefer <details>/ <summary> or equivalent server-rendered markup. See rendering-strategies for SSR, SSG, CSR and crawler visibility.
Technically: Yes—if all content is in the DOM at load, more tabs = more indexable content. Mobile-first indexing gives full weight to tabbed content in HTML.
Strategically: Not always. Signal dilution occurs when many tabs = many different topics on one page. Google may struggle to understand which query the page should rank for; topical authority and keyword focus get spread thin.
ScenarioUse tabs?AlternativeSame topic (How-to Step 1/2/3; product specs: dimensions, materials, shipping)✅ Yes—Different topics (Service A, Service B, Portfolio, Blog)❌ NoSeparate URLs per topic; see content-strategy for pillar/cluster
When many horizontal tabs work: All tabs semantically related to one query (e.g., one how-to, one product). When to use separate pages: Each tab is a distinct topic deserving its own URL, crawl, and ranking opportunity.
Use <details> and <summary>—no JavaScript required; accessible; crawlable.
html
<details open>
<summary>First question (expanded by default)</summary>
<p>Answer content here.</p>
</details>
<details>
<summary>Second question</summary>
<p>Answer content here.</p>
</details>
open attribute so it's expanded by default<summary>: Must be first child of <details>; acts as toggleIf using JS-only tabs: ensure all tab content is in the DOM at page load, not loaded via AJAX on click. Google does not simulate tab clicks. Prefer <details>/ <summary> or server-rendered HTML. See rendering-strategies.
display: none or visibility: hidden for primary content—Google may treat differentlyPracticePurposeFirst item expandedEnsures primary content visible on load; better for SEO and UXDescriptive headers<summary> / tab labels should clearly describe content; include keywords naturallyLogical structureH2/H3 for sections; supports snippet extraction; see featured-snippet****Answer-firstFor FAQ: 40–60 words direct answer; then detail; see faq-page-generator
Use caseFormatLayoutNotesFAQAccordionVerticalFAQPage schema; first Q expanded; see faq-page-generator****How-to stepsTabsHorizontalStep 1, Step 2, Step 3; sequential flowProduct specsTabsHorizontalDimensions, materials, shipping—secondary to heroLong guidesAccordionVerticalCollapsible sections; see toc-generator****Pricing tiersTabsHorizontalCompare plans; primary CTA visibleObjection handlingAccordionVertical"What about X?"—supporting conversion
<details>/ <summary> natively keyboard-accessible<details>/ <summary> or equivalent server-rendered HTML