HTML <details> Tag
The HTML <details> tag specifies additional details that the user can view or hide on demand.
The <details> tag can used to create an interactive widget that the user can open and close. Any sort of content can be put inside the <details> tag.
The <summary> tag is used to specify a visible heading for the details. The heading can be clicked to view/hide the details.
- Example Code:
<p>HTMLPortal is a site dedicated to helping you with HTML.</p>
HTMLPortal is a site dedicated to helping you with HTML.
Attribute Definition open Specifies whether the details should be open (visible to the user) or closed (hidden from the user).
- Global Attributes:
The <details> tag also supports the Global Attributes in HTML5
- Event Attributes:
The <details> tag also supports the Event Attributes in HTML5