[英]HTML validation error: table row has no cells beginning in it
<table border="1">
<tr>
<td rowspan="4">A</td>
<td colspan="5">B</td>
</tr>
<tr>
<td colspan="3">E</td>
<td rowspan="2">F</td>
<td rowspan="4">C</td>
</tr>
<tr>
<td rowspan="2">G</td>
<td>
<table border="1">
<tr>
<td>1</td><td>2</td>
</tr>
<tr>
<td>3</td><td>4</td>
</tr>
</table>
</td>
<td>
<table border="1">
<tr>
<td>1</td><td>2</td>
</tr>
<tr>
<td>3</td><td>4</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="3">H</td>
</tr>
<tr>
<td colspan="5">D</td>
</tr>
</table>
W3C Validator complains, that: "Table column 6 established by element td has no cells beginning in it." W3C验证程序抱怨:“由元素td建立的表第6列中没有任何单元格。” even though cell 'C' should begin on 6th column. 即使单元格“ C”应从第6列开始。 It displays correctly, so could it be a bug in the validator? 它可以正确显示,所以它可能是验证程序中的错误吗?
This appears to be a bug in the validator. 这似乎是验证程序中的错误。 It somehow fails to analyze the table properly. 它以某种方式无法正确分析该表。
Proving this might require a detailed analysis based on the HTML5 table model , but if you just add <col><col><col><col><col><col>
right after the <table ...>
tag, the markup passes validation – perhaps because it tells the browser that there are six columns and this helps the validator to recognize the status of the C cell properly. 要证明这一点,可能需要基于HTML5表模型进行详细分析,但是如果您只是在<table ...>
标记后添加<col><col><col><col><col><col>
通过验证–也许是因为它告诉浏览器有六列,这有助于验证程序正确识别C单元的状态。 I accidentally noticed this when I added the col
elements in order to set background colors on columns to visualize the situation better. 当我添加col
元素以在列上设置背景颜色以更好地观察情况时,我无意中注意到了这一点。
Consider posting a bug report and reporting back here if there will be progress there. 考虑在这里发布错误报告,并在此处报告进度,如果有进展的话。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.