回到目录

HTML元素 - caption

定义

表格的标题,对表格的简单描述。

Specifies a brief description for a table.

注释

CAPTION 元素应该是 TABLE 元素的子对象。

TABLE 对象及其关联元素有一个独立的表格对象模型,该模式使用不同于常规对象模型的方法。要获得关于表格对象模型更多的信息,请参看如何动态生成表格。

此元素在 Internet Explorer 3.0 及以上版本的 HTML 中可用,在 Internet Explorer 4.0 及以上版本的脚本中可用。

此元素是内嵌元素。

此元素需要关闭标签。

The CAPTION element should be a child of the TABLE element.

The table object and its associated elements have a separate table object model, which utilizes different methods than the general object model. For more information on the table object model, see How to Build Tables Dynamically.

This element is available in HTML as of Internet Explorer 3.0, and in script as of Internet Explorer 4.0.

This element is an inline element.

This element requires a closing tag.

示例代码

<TABLE>
<CAPTION VALIGN=BOTTOM>
This caption will appear below the table.
</CAPTION>
<TBODY>
<TR>
<TD>
This text is inside the table.
</TD>
</TR>
</TBODY>
</TABLE>

 

演示示例:带标题的表格