← TechnologyThe essentials of

details and summary: expandable block with HTML

Publisher: ResumeMaker • 1 source

Published: 22 Oct 2026 13:13 · Updated: 22 Oct 2026 13:13

AI source check: 21 Oct 2026 10:36. This is not editorial approval.

In a few sentences

In brief

The <details> element creates a disclosure block, and <summary> provides its visible heading.

Useful to know

The <details> element creates a disclosure block, and <summary> provides its visible heading. The remaining content is shown when the block is open. For short supplementary information, this can replace a custom JavaScript mechanism. [1]

An example is <details><summary>What is included?</summary><p>Three files and instructions.</p></details>. The heading should indicate what will be revealed rather than simply saying “More”. This is a small illustrative component, not a description of a real product.

Sources

For further detail and to check the information:

  1. [1] MDN — details ↗