Plain

Plain HTML, no CSS or JS.

<details>
  <summary>Heading 1</summary>

  My content
</details>

<details>
  <summary>Heading 2</summary>

  More content
</details>

Plain JavaScript

See W3 schools tutorials:

jQuery

See Accordion in the jQuery section.