Toggle and accordion

An accordion reveals or hides related content. Start with the native HTML elements when their behavior fits your design.

What you will learn

Native solution

<details>
  <summary>What is an accordion?</summary>
  <p>It reveals one section of related content.</p>
</details>

The browser supplies the toggle interaction and keyboard behavior. Use clear summary text and do not hide information users need to complete a task.

Common mistakes