Summary element
The HTML summary element provides the visible label for a details disclosure widget and controls its expansion.
Build a Website with ChatGPT
A summary element is the HTML element that provides the visible title or description for a details element and controls its expansion.
- How it is used
- Uses a visible title or description to let visitors reveal and hide accordion content.
- How deep it goes
- Explains the collapsed and expanded interaction, but stops short of detailed HTML or CSS implementation.
- Examples
- Uses journal entry titles, dates, entry text, four sample posts, disclosure arrows, and collapsed or expanded accordion figures.
- What you can do after
- Apply it via HTML and ChatGPT prompts to generate journal-page accordions with titles, dates, and expandable entry text.
Read how Build a Website with ChatGPT explains summary element →
HTML5 in Action
The HTML summary element provides a visible heading or label for a details disclosure widget.
- How it is used
- Labels the visible heading of a collapsible details section.
- How deep it goes
- Explains the label and closed-versus-open behavior, but does not detail implementation internals.
- Examples
- Uses a labeled disclosure and a file-browser view as examples.
- What you can do after
- Build a labeled collapsible section with HTML markup.
Also covered in
- Vanilla WebIn early access (MEAP)
Related concepts
- details elementpart of · The HTML details element is a disclosure widget that contains additional information that users can show or hide, typically through an associated summary.
- accordionpart of · An accordion is a user-interface component whose content sections expand or collapse beneath their corresponding headers.
- HTML elementkind of · An HTML element is a structural or semantic unit of an HTML document, defined by markup and represented in the document tree.
Questions about summary element
What is summary element?
The HTML summary element provides the visible label for a details disclosure widget and controls its expansion.
Which Manning books explain summary element?
Build a Website with ChatGPT and HTML5 in Action.
What is summary element a kind of?
Summary element is a kind of HTML element. An HTML element is a structural or semantic unit of an HTML document, defined by markup and represented in the document tree.
What is summary element part of?
Summary element is part of details element. The HTML details element is a disclosure widget that contains additional information that users can show or hide, typically through an associated summary.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

