HTML summary - how to use <summary> tag

The HTML <summary> tag is used to define a heading for the details tag which can be clicked to show / hide the details.

The <summary> tag is not supported by Internet Explorer.


The summary tag supports the global and event attributes.


<details open="open"> <summary>List of countries</summary> <ul> <li>Australia</li> <li>China</li> <li>India</li> </ul> </details>