A worked example, rendered from real sample data. Sign in to run the tool on your own input.
border=#e5e7eb/* Uses <details>/<summary> — no JS needed */
.accordion { border: 1px solid #e5e7eb; border-radius: 8px; overflow: hidden; }
.accordion details + details { border-top: 1px solid #e5e7eb; }
.accordion summary {
padding: 14px 16px; cursor: pointer; font-weight: 600;
list-style: none; display: flex; justify-content: space-between; align-items: center;
}
.accordion summary::after { content: '+'; font-size: 20px; transition: transform 200ms ease; }
.accordion details[open] summary::after { transform: rotate(45deg); }
.accordion .content { padding: 0 16px 14px; color: #6b7280; }
Build a zero-JS accordion using <details>/<summary> + CSS animation. Part of the DevTools Surf developer suite. Browse more tools in the CSS collection.