HTML <details> Tag

<p>If your browser supports this element, you will be able to expand and collapse these details.</p>
<p>You can click the summary again to collapse.</p>

The above example demonstrates usage of the <details> element.

The <details> element represents additional details that the user can view or hide on demand. This is in the form of a legend that can be clicked on to expand or collapse further details as required.

The <details> element can also be used with the summary element so that you can provide your own legend. If not provided, the browser will provide its own legend (eg, Details).

The element accepts the (optional) open attribute.