表格中的 html 表格是否有效?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9764070/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Is a html table within a table valid?
提问by Bill
In html, is it valid to have a table inside of a table?
在 html 中,表格内有表格是否有效?
<table>
<tr>
<td>
<table>
<tr>
<td></td>
</tr>
</table>
</td>
</tr>
<tr></tr>
</table>
回答by Anthony Shaw
Yes, perfectly valid.
是的,完全有效。
By pasting what you have into the W3C validator, the only errors are regarding doctype, head tags, etc... nothing ever mentioned of nesting table within table (even after adding all the correct tags that it errored on) It suggests using a tbody
通过将您拥有的内容粘贴到 W3C 验证器中,唯一的错误是关于 doctype、head 标签等......没有提到在表中嵌套表(即使添加了它出错的所有正确标签)它建议使用 tbody