The <details>
HTML tag was designed specifically for this purpose. Here is the example from the MDN documentation. The tag is supported on all current browsers, but not on IE.
<details>
<summary>Details</summary>
Something small enough to escape casual notice.
</details>