HTML <summary> Tag

Click here to hear my secret...
<p>I'm not telling you any of my secrets! Who do you think I am!</p>

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

The <summary> element can be used to provide a summary for the details element. This summary is what the user can click on to expand and collapse the full contents of the details element.

Note that the <summary> element is optional when using the details element. If you don't provide a summary the browser will provide its own (eg, Details).

Note that the details element accepts the (optional) open attribute, which allows you to have the details already expanded when the page initially loads.