HTML / Element / Initial coverage

The <details> Element

Status: Initial coverage Scope: HTML Living Standard Specification checked: 2026-09-17

Technical Summary

The details element represents a disclosure widget from which a user can obtain additional information or controls. Its first summary element child represents the summary or legend; the remaining contents represent the additional information or controls.

open is a boolean content attribute for the visibility state. Non-empty equal name values group details elements in the same tree into an exclusive group managed by the user agent. This element does not represent tab or menu widgets.

Definition / Categories

ItemSpecification summary
MeaningA disclosure widget for additional information or controls
CategoriesFlow content, Interactive content, Palpable content
ContextWhere flow content is expected
Content modelOne summary element followed by flow content
Content attributesGlobal attributes, name, and open
DOM interfaceHTMLDetailsElement, including the open IDL attribute

Disclosure and summary selection

The first summary element child is the summary for the details element. If there is no summary child, the user agent may provide its own legend, such as “Details”. The rest of the element's contents represent the additional information or controls.

<details>
  <summary>Check the implementation conditions</summary>
  <p>This is the additional information or control area.</p>
</details>

The summary content model is phrasing content, optionally intermixed with heading content. For a useful closed-state label, keep the text specific enough to predict what will be revealed.

Native disclosure example

This example uses no page-side JavaScript for the basic open and close behavior. The user agent manages the open state and disclosure UI.

open state and activation

open is a boolean content attribute. When present, the summary and additional contents are shown; when absent, only the summary is shown. Activating the summary causes the user agent to set or remove the parent details element's open attribute.

const details = document.querySelector('details');

details.open;            // Boolean reflection of the open attribute
details.toggleAttribute('open');

details.addEventListener('toggle', (event) => {
  console.log(event.oldState, event.newState);
});

Changes to open queue a toggle event. When the state changes repeatedly in quick succession, the notification task is coalesced, so an event is not necessarily fired for every intermediate state. Attribute changes, current rendering, and event timing should be analyzed separately.

Exclusive groups with name

Details elements in the same tree with the same non-empty name value belong to the same details name group. Opening one removes the open attribute from another open member. Initial markup must not contain more than one open member of the same group.

SPEC

This section describes the normative claims to check.

IMPL

This section describes observations reproduced in a browser.

If the purpose is to compare multiple sections at once, an exclusive group may be the wrong information design. The convenience of an accordion should be weighed against the cost of repeatedly reopening content.

Content model and usage boundary

StructureWhat to verify
First summaryActs as the summary or legend for the disclosure
Flow content after summaryAdditional information or controls revealed when open
No openOnly the summary is shown; the disclosure is closed
Equal nameSame-tree, non-empty values form an exclusive group

details is for disclosure widgets. Do not replace tab widgets, menu widgets, footnotes, or dialogs with details merely because their visual presentation might look similar.

DOM Interface

HTMLDetailsElement.open reflects the presence of the open attribute as a boolean. When reading the specification state, separate the boolean state from the attribute's string value.

const details = document.querySelector('#settings');
const summary = details.querySelector(':scope > summary');

details.open;
details.hasAttribute('open');
summary.textContent;

Fact / Evidence

Normative claims about the element, summary selection, state changes, and exclusive groups are separated from browser and accessibility observations in the Implementation Evidence section below.

Major facts and source locations
TypeFact / claimCondition / scopeStatusSource
SPECdetails represents a disclosure widget, and its first summary element child is its summary or legend.Meaning, context, content model, and summary selection.ReviewedHTML Standard: details element
SPECopen is a boolean attribute that represents the visibility state of the summary and additional contents.Attribute presence, summary activation, initial and current state.ReviewedHTML Standard: open state
SPECChanges to open queue a toggle event, and repeated changes may be coalesced into one notification.Details notification task, ToggleEvent, oldState, and newState.ReviewedHTML Standard: details notification task
SPECDetails elements in the same tree with equal non-empty name values form a group with at most one open member.Group membership, open-attribute exclusivity, and initial markup.ReviewedHTML Standard: details name group
SPECA summary is the summary for its parent details when it is the first summary element child.First-child relation, summary selection, and activation behavior.ReviewedHTML Standard: summary element

Evidence

  1. HTML Standard: The details element — meaning, categories, content model, open, name groups, toggle notification, and DOM interface
  2. HTML Standard: The summary element — summary selection, content model, and activation behavior
  3. HTML Accessibility API Mappings — entry point for roles, names, and expanded-state mappings
  4. Web Platform Tests: the-details-element — related tests for details, summary, open, and exclusive name groups

Implementation Evidence

Browser implementation, WPT, and accessibility observations are recorded separately from normative claims. No dedicated fixture has been executed for this new topic, so unverified items are not marked as reviewed.

Dedicated fixture: details-v1 is a proposed identifier for a follow-up fixture covering initial open, summary activation, IDL state, toggle, and exclusivity within a shared name group. The fixture file and execution results are not registered yet.

Implementation evidence registry for the details element
TypeReproduction scopeConditions to recordStatus
IMPLSummary activation, open IDL reflection, toggle event, and name-group exclusivityRecord browser and OS, date, fixture ID details-v1, initial markup, and dynamic changes across Chrome, Firefox, and SafariNot run
WPTIndividual tests for details, summary, open, toggle, and exclusive details name groupsRun selected files under the-details-element; record browser, date, pass/fail, and unrun reasonsNot run
AAMSummary role and accessible name, details expanded state, and the tree after togglingObserve closed/open states in browser accessibility trees, compare with HTML-AAM, and where possible include assistive-technology observationsNot run

Native disclosure indicators, keyboard interaction, rendering, and accessibility-tree exposure may depend on the user agent, OS, and state. A single-environment observation will not be registered as universal browser behavior.

Coverage / Open Issues

  • CoveredMeaning, categories, context, content model, content attributes, and DOM interface
  • CoveredSummary selection, boolean open state, toggle notification, and the exclusive name-group model
  • OpenCross-browser comparison of summary activation, open reflection, toggle events, and name groups
  • OpenDisclosure-marker rendering, closed-content rendering, dynamic insertion/movement, and repeated toggles
  • OpenIndividual WPT results, HTML-AAM mappings, accessibility-tree observations, and assistive-technology differences

This is initial coverage. It records the normative scope without claiming identical disclosure UI, event timing, accessibility API results across browsers, or completion of the entire details element review.

Related surface

For a beginner-friendly explanation of disclosure sections, summary, open, and name, see the details element page in Yugien. For the semantic and interaction boundary with dialogs, see the dialog element. For command activation, see the button element; for the scripting boundary, see the script element.