ThinkSSL🔒 一键申购 5分钟快速签发 30天无理由退款 购买更放心 广告
# HTML &lt;caption&gt; 标签 ## 实例 ``` <table border="1"> <caption>Monthly savings</caption> <tr> <th>Month</th> <th>Savings</th> </tr> <tr> <td>January</td> <td>$100</td> </tr> </table> ``` ## 浏览器支持 | IE | Firefox | Chrome | Safari | Opera | | --- | --- | --- | --- | --- | 所有浏览器都支持 &lt;caption&gt; 标签。 ## 定义和用法 caption 元素定义表格标题。 caption 标签必须紧随 table 标签之后。您只能对每个表格定义一个标题。通常这个标题会被居中于表格之上。 ## HTML 与 XHTML 之间的差异 在 HTML 4.01 中,caption 元素的 align 属性是不被赞成使用的。 在 XHTML 1.0 Strict DTD 中,caption 元素的 align 属性是不被支持的。 ## 可选的属性 | 属性 | 值 | 描述 | | --- | --- | --- | | [align](/tags/att_caption_align.asp "HTML &lt;caption&gt; 标签的 align 属性") | `left` `right` `top` `bottom` | 不赞成使用。请使用样式取而代之。规定标题的对齐方式。 | ## 全局属性 &lt;caption&gt; 标签支持 [HTML 中的全局属性](/tags/html_ref_standardattributes.asp)。 ## 事件属性 &lt;caption&gt; 标签支持 [HTML 中的事件属性](/tags/html_ref_eventattributes.asp)。