用于与<details>标签一起使用。它用作<details>元素内容的摘要、标题或图例。

<summary>标签用在<details>标签内,必须有一个闭合标签。

<summary>标签是在HTML5中引入的新标签。

HTML <summary> 标签示例

<details>
  <summary>JavaTpoint Summary</summary>
  <p>JavaTpoint is a popular tutorial website.</p>
  <p>You can learn various tutorials on JavaTpoint such as HTML, CSS, JavaScript, Java, Android.</p>
</details>

让我们看一个HTML <summary> 标签的另一个例子。

<details>
  <summary>MacBook Pro Specification</summary>
  <ul>
    <li><strong>13.3-inch LED-backlit glossy widescreen display</strong> with edge-to-edge, uninterrupted glass (1280 x 800-pixel resolution).</li>
    <li><strong>2.4 GHz Intel Core i5 dual-core processor</strong> with 3 MB shared L3 cache for excellent multitasking.</li>
    <li><strong>Intel HD Graphics 3000</strong> with 384 MB of DDR3 SDRAM shared with main memory.</li>
    <li><strong>500 GB Serial ATA hard drive</strong> (5400 RPM)</li>
    <li><strong>4 GB installed RAM</strong> (1333 MHz DDR3; supports up to 8 GB)</li>
  </ul>
</details>

支持的浏览器

Elementchrome browser Chromeie browser IEfirefox browser Firefoxopera browser Operasafari browser Safari
<summary>

标签: html, HTML教程, HTML技术, HTML学习, HTML学习教程, HTML下载, HTML语言, HTML开发, HTML入门教程, HTML进阶教程, HTML面试题, HTML笔试题, HTML编程思想