<summary>
版本:HTML5
HTML<summary>元素用作一个<details>元素的一个内容的摘要,标题或图例。
浏览器支持
![]() | ![]() | ![]() | ![]() | ![]() |
目前,只有 Chrome 和 Safari 6 支持<summary> 标签。 |
示例
<details> <summary>copyright 1999-2011.</summary> <p>- by refsnes data. all rights reserved.</p> <p>all content and graphics on this web site are the property of the company refsnes data.</p> </details>
copyright 1999-2011.
- by refsnes data. all rights reserved.
all content and graphics on this web site are the property of the company refsnes data.
标签定义及使用说明
<summary>
标签为<details>
元素定义一个可见的标题。当用户点击标题时会显示出详细信息。
提示:如果<summary>
元素在浏览器内不能被正确解析和渲染,,则会展示<details>
标签内的其他内容。
标签闭合 | 开始标签和结束标签都不能省略。 |
---|---|
父级元素 | <summary> 元素是<details> 元素的子元素。 |
文档规范 | HTML5, section 4.11.2 |
属性
本元素仅支持全局属性。
HTML 4.01 与 HTML5之间的差异
<summary>
标签是 HTML5 中的新标签。
全局属性
<summary>
标签支持HTML 的全局属性。
事件属性
<summary>
标签支持HTML 的事件属性。