FAQ Component

Convert FAQ HTML to Liquid for Shopify

Turn static FAQ accordion markup into a Shopify section with block-based questions, richtext answers, and schema merchants can manage in the theme editor.

Component overview

Building FAQ sections merchants actually edit

HTML structure for FAQ conversion

Ideal source HTML uses repeating wrappers (.faq-item, details/summary pairs, or button+panel siblings). Identical structure per row enables Block mode detection. One-off legal disclaimers belong in section settings, not block loops.

Liquid conversion strategy

Always Block mode: {% for block in section.blocks %} with {{ block.shopify_attributes }} on each row. Prefer details/summary for native keyboard accessibility or match theme's existing accordion pattern. Output questions with | escape; answers in richtext inside .rte.

Schema design for FAQ modules

Block type faq_item with text question + richtext answer. Section settings: heading, optional intro richtext, open_first checkbox. Preset with 3–4 seeded questions. max_blocks optional cap for performance on long policy pages.

CSS and accessibility

Focus styles on summary/button elements. Touch targets 44px minimum on mobile. Scope accordion borders to section.id. Do not rely on hover-only affordances. Test with keyboard navigation after export.

Common FAQ mistakes

Flat mode with twelve indexed Q&A pairs—merchants cannot reorder. Missing shopify_attributes. answer field as text instead of richtext. No {% else %} empty state when all blocks deleted. Duplicate accordion JavaScript per block.

FAQ QA checklist

Add/delete/reorder blocks in editor. Answers with bold/links render in .rte. Mobile tap targets work. Empty block list shows helpful message. Matches theme accordion animation timing if inherited.

Examples

FAQ HTML to Liquid conversion example

A concise look at how static FAQ markup becomes editable Shopify section code.

HTML structure

<div class="faq-item">
  <button class="faq-q">Shipping times?</button>
  <div class="faq-a">3–5 business days.</div>
</div>

Repeating .faq-item rows signal block candidates—the converter counts identical structures to propose a block type.

Liquid output

"{% for block in section.blocks %}"
  <details class="faq-item">
    <summary>{{ block.settings.question }}</summary>
    <div>{{ block.settings.answer }}</div>
  </details>
{% endfor %}

Static text becomes block.settings references inside a loop merchants control from the editor.

Schema settings

"blocks": [{
  "type": "faq_item",
  "name": "FAQ item",
  "settings": [
    { "type": "text", "id": "question", "label": "Question" },
    { "type": "richtext", "id": "answer", "label": "Answer" }
  ]
}]

Each block type exposes typed settings the theme editor renders as form fields.

Section settings

"settings": [
  { "type": "text", "id": "heading", "label": "Heading" },
  { "type": "checkbox", "id": "open_first", "label": "Open first item" }
]

Section-level settings control the module heading and accordion behavior independent of block rows.

Use cases

Shopify FAQ use cases

Where converted FAQ sections land on real storefronts.

Collapsible content sections

Replace Dawn's default collapsible-content with a branded FAQ that matches campaign typography and spacing.

Dynamic merchant-managed FAQs

Let support teams add seasonal shipping FAQs or warranty updates without developer tickets.

Product page FAQs

Drop FAQ sections on product JSON templates so each category can share or override common questions.

Workflow

How FAQ conversion works

Paste accordion HTML, export a block-based Shopify section with scoped CSS and validated schema.

  1. 01

    Paste HTML

    Import your FAQ accordion markup with all Q&A rows.

  2. 02

    Analyze structure

    Detect repeating items and map them to block types.

  3. 03

    Generate Liquid

    Compile accordion Liquid with block.settings output.

  4. 04

    Generate schema

    Create block schema, section settings, and presets.

  5. 05

    Export section

    Download section.liquid and add it to your theme.

Related

Guide

HTML to Liquid Converter

Free guide — paste component HTML and export a complete Shopify section file.

Open guide →

Tool

Open converter workspace

Paste component HTML and export a complete Shopify section file.

Open guide →

Generator

Shopify Section Generator

Generate OS 2.0 sections with schema, blocks, and presets.

Open guide →

Schema

Liquid Schema Generator

Design schema JSON that pairs with converted component Liquid.

Open guide →

Tool

Shopify Liquid Converter

Convert HTML markup into clean Shopify Liquid templates.

Open guide →

Blog

Component conversion guides

Read tutorials on sections, schema, and block patterns.

Open guide →

Theme

HTML to Dawn Theme

Ship FAQ and content sections on Shopify's reference theme.

Open guide →

Theme

HTML to Prestige Theme

Adapt component sections for Prestige editorial storefronts.

Open guide →

Theme

HTML to Broadcast Theme

Deploy story-driven component sections on Broadcast.

Open guide →

Theme

HTML to Impulse Theme

Use conversion-focused component sections on Impulse.

Open guide →

Component

Convert slider HTML to Liquid

Map carousels to reorderable slide blocks.

Open guide →

Component

Convert banner HTML to Liquid

Export promo and announcement banners with schema settings.

Open guide →

Component

Convert hero section HTML to Liquid

Build campaign heroes with editable headings and CTAs.

Open guide →

Component

Convert product grid HTML to Liquid

Wire collection-driven product grids with schema controls.

Open guide →

Component

Convert tabs HTML to Liquid

Convert tabbed panels into merchant-editable sections.

Open guide →

Component

Convert accordion HTML to Liquid

Export collapsible panels as repeatable Shopify blocks.

Open guide →

Convert HTML to Shopify Liquid

Paste HTML & generate Liquid with schema, blocks, and scoped CSS. No signup required.