<summary>

概述

HTML <summary> 元素 用作 一个<details>元素的一个内容的摘要,标题或图例。

提示: 如果 <summary> 元素在浏览器内不能被正确解析和渲染,,则会展示<details>标签内的其他内容。
标签闭合 开始标签和结束标签都不能省略。
父级元素 <summary>元素是<details> 元素的子元素。
文档规范 HTML5, section 4.11.2

属性

本元素仅支持全局属性

DOM 接口

本元素支持 HTMLElement 接口.

示例

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

请参考 <details> 页面内有关 <summary>元素的示例.

规范

Specification Status Comment
HTML Living Standard
<summary>
Living Standard
HTML 5.1
<summary>
Recommendation

浏览器兼容性

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
summaryChrome Full support 12Edge No support No
Notes
No support No
Notes
Notes In development.
Firefox Full support 49IE No support NoOpera Full support 15Safari Full support 6WebView Android Full support 4Chrome Android Full support YesFirefox Android Full support 49Opera Android Full support 14Safari iOS No support NoSamsung Internet Android Full support Yes
display: list-itemChrome No support No
Notes
No support No
Notes
Notes Chrome currently doesn't use display: list-item on the <summary> element, so display: block will not automatically hide the disclosure widget. Instead, use the non-standard pseudo-element ::-webit-details-marker to change the disclosure widget in Chrome. See Chrome bug 590014 for details.
Edge No support NoFirefox Full support 49IE No support NoOpera No support NoSafari No support NoWebView Android No support NoChrome Android No support No
Notes
No support No
Notes
Notes Chrome currently doesn't use display: list-item on the <summary> element, so display: block will not automatically hide the disclosure widget. Instead, use the non-standard pseudo-element ::-webit-details-marker to change the disclosure widget in Chrome. See Chrome bug 590014 for details.
Firefox Android Full support 49Opera Android No support NoSafari iOS No support NoSamsung Internet Android No support No

Legend

Full support  
Full support
No support  
No support
See implementation notes.
See implementation notes.

参见