--- title: slug: Web/HTML/Element/summary translation_of: Web/HTML/Element/summary ---
{{HTMLRef}}

Summary

The HTML summary element (<summary>) is used as a summary, caption, or legend for the content of a {{HTMLElement("details")}} element.

Note: If the <summary> element is omitted, the heading "details" will be used.
Note: The default style for <summary> is display:list-item per HTML standard.  If the style is being changed to display:block, the disclosure triangle will be dismissed, which is expected. See Bug 1283989 for more information.

Usage context

Permitted content Phrasing content or one element of Heading content
Tag omission None, both the start tag and the end tag are mandatory.
Permitted parent element The {{HTMLElement("details")}} element.
Normative document HTML5, section 4.11.2

Attributes

This element only includes the global attributes.

DOM interface

This element implements the {{domxref("HTMLElement")}} interface.

Examples

In summation, get details from the link on the next line

Please see the {{HTMLElement("details")}} page for examples on <summary>.

Specifications

Specification Status Comment
{{SpecName('HTML WHATWG', 'interactive-elements.html#the-summary-element', '<summary>')}} {{Spec2('HTML WHATWG')}}  
{{SpecName('HTML5.1', 'interactive-elements.html#the-summary-element', '<summary>')}} {{Spec2('HTML5.1')}} Initial definition

Browser compatibility

{{Compat("html.elements.summary")}}

See also