FAQ

Accordion list

Expandable questions using <details>

Live preview
Build an FAQ accordion with Tailwind CSS using native <details>/<summary> elements so it works without JavaScript. Each item is a bordered row with a question in the summary, a rotating chevron via marker or a span, and an answer paragraph that reveals on open. Stack items with dividers inside a max-w-2xl column and a heading on top. Then layer on optional JavaScript that turns it into a true accordion: when one item opens, close whichever one was open, so only a single answer shows at a time. Everything still works with the script removed — that is the point of building on details.