<details> and <summary>

A built-in open/close section, perfect for FAQs, with no JavaScript needed.

Also called: accordion, disclosure

Domain
Languages
Source
General
Languages
HTML, CSS

Example

The FAQ uses details and summary, so it opens and closes without JavaScript.

In code

<details>
  <summary>Do you build online shops?</summary>
  <p>Yes, with WooCommerce or Shopify.</p>
</details>

Learn more

Related terms

Added 2026-11-30 · Last reviewed 2026-11-30