Наши волонтёры ещё не перевели данную статью на Русский. Присоединяйтесь к нам и помогите сделать эту работу!
Вы можете также прочитать эту статью на English (US).
The HTML <summary> element is used as a summary, caption, or legend for the content of a <details> element.
| Permitted content | Phrasing content or one element of Heading content |
|---|---|
| Tag omission | None, both the start tag and the end tag are mandatory. |
| Permitted parents | The <details> element. |
| Permitted ARIA roles | button |
| DOM interface | HTMLElement |
Attributes
This element only includes the global attributes.
Usage notes
If the <summary> element is omitted, the heading "details" will be used.
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.
Examples
In summation, get details from the link on the next line
Please see the <details> page for examples on <summary>.
Specifications
| Specification | Status | Comment |
|---|---|---|
| HTML Living Standard The definition of '<summary>' in that specification. |
Living Standard | |
| HTML 5.1 The definition of '<summary>' in that specification. |
Recommendation | Initial definition |
Browser compatibility
| Feature | Chrome | Edge | Firefox | Internet Explorer | Opera | Safari |
|---|---|---|---|---|---|---|
| Basic support | 12 | No1 | 49 | No | No | 6 |
| Feature | Android webview | Chrome for Android | Edge mobile | Firefox for Android | IE mobile | Opera Android | iOS Safari |
|---|---|---|---|---|---|---|---|
| Basic support | 4 | Yes | No1 | 49 | No | No | No |
1. In development.

