Pure CSS Accordions

CSS accordions expand and collapse sections of content using the details element, radio inputs or :target, so they stay accessible and script-free.

15 free examples, most liked first. Click one to preview it and copy the code.

Accordions FAQ

How do I make an accordion with CSS only?

Use the HTML details and summary elements, or radio inputs with sibling selectors, then style the open state. The examples here include both approaches.

How do I use these pure CSS accordions?

Open an example, copy the HTML and the CSS, and paste them into your page. There is nothing to install and no JavaScript to load.

More pure CSS examples