Welcome! This accordion is built with zero JavaScript — only radio buttons and CSS. Because all inputs share the same name, checking one automatically unchecks the others, giving you exclusive single-open behaviour entirely in HTML and CSS.
<input type="radio"> followed by a <label> and a .content div. The CSS rule input:checked ~ .content sets max-height to a large value, and a CSS transition animates the expand/collapse smoothly — no JS required.aria-expanded via a small JS snippet to improve announcements.max-height transition approach is the most reliable CSS-only animation method since height: auto cannot be transitioned directly.+ icon for an SVG chevron, adjust the transition duration, change colors via CSS variables, or nest accordions by using different name attribute groups. Each independent group controls its own open state without affecting the others.