闪字急切网:使用<tbody>标签,在低版本浏览器中,会不会不显示<tbody></tbody>间的内容

来源:百度文库 编辑:查人人中国名人网 时间:2024/05/08 02:44:52
使用<tbody>标签,在低版本浏览器中,会不会不显示<tbody></tbody>间的内容
悬赏分:30 - 离问题结束还有 11 天 10 小时
请问在不支持<tbody>标签的浏览器中,会不会,因为使用了<tbody>而导致<tbody>与</tbody>之间的内容不显示,
还有就是:听说在网页中不加
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
那么<tbody>也不起任何做用是吗?

<tbody></tbody> 标签。
不懂它的浏览器只会略去标签,不会略去首末标签间的内容。
这是浏览器的传统约定。

不需要<!DOCTYPE 。。。>,浏览器自己会猜。写了当然明确些,浏览器就不猜HTML版本了。

是<tbody>还是<body>?

HTML元素 - tbody

定义
指明哪些行作为表格的主体。

Designates rows as the body of the table.

注释
TBODY 元素内包含的有效标签有:

TD
TH
TR
所有表格都有 TBODY 元素,就算表格没有显式定义 TBODY 元素。

table 对象及其相关的元素有各自独立的表格对象模型,这与常规对象模型所采用的方法有很大不同。要获得关于表格对象模型更多的信息,请参看如何动态生成表格。

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

此元素不改变显示。

此元素需要关闭标签。

Valid tags within the TBODY element include:

TD
TH
TR
The TBODY element is exposed for all tables, even if the table does not explicitly define a TBODY 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 not rendered.

This element requires a closing tag.

示例代码
<TABLE>
<THEAD>
<TR>
<TD>
This text is in the THEAD.
</TD>
</TR>
</THEAD>
<TBODY>
<TR>
<TD>
This text is in the TBODY.
</TD>
</TR>
</TBODY>
</TABLE>