Get to know MDN better
This feature is well established and works across many devices and browser versions. It’s been available across browsers since January 2020.
* Some parts of this feature may have varying levels of support.
The HTMLDetailsElement interface provides special properties (beyond the regular HTMLElement interface it also has available to it by inheritance) for manipulating <details> elements.
EventTarget Node Element HTMLElement HTMLDetailsElementInherits properties from its parent, HTMLElement.
HTMLDetailsElement.nameA string reflecting the name HTML attribute, which allows you to create a group of mutually-exclusive <details> elements. Opening one of the named <details> elements of this group causes other elements of the group to close.
HTMLDetailsElement.openA boolean value reflecting the open HTML attribute, indicating whether or not the element's contents (not counting the <summary>) is to be shown to the user.
No specific method; inherits methods from its parent, HTMLElement.
Inherits events from its parent interface, HTMLElement.
This example uses the HTMLElement toggle event to add and remove chapters from a log aside as they are opened and closed.
| HTML # htmldetailselement |
| HTML # event-toggle |
Enable JavaScript to view this browser compatibility table.
Enable JavaScript to view this browser compatibility table.
This page was last modified on Apr 10, 2025 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.