简体   繁体   English

HTML验证错误:表格行开头没有单元格

[英]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.

相关问题 帮助解决HTML验证错误:“表格”列的开头没有单元格 - Help with HTML validation error: Table column has no cells beginning in it 表格HTML验证问题-元素th中没有任何单元格 - Table HTML validation issue - element th has no cells beginning in it HTML验证错误-由元素th建立的范围为4…5的表格列中没有任何单元格 - HTML validation error-Table columns in range 4…5 established by element th have no cells beginning in them 验证 html 代码,错误表第 2 列建立的元素 th 没有单元格开头 - Validating html code, error Table column 2 established by element th has no cells beginning in it 由tbody元素建立的行组的第2行上没有任何单元格 - Row 2 of a row group established by a tbody element has no cells beginning on it 如何在HTML表格中添加空白单元格,从而使行与包含数据的行具有相同数量的单元格? - How to add blank cells in an HTML table so row has the same amount of cells as a row with data? 反转html表格行中的单元格 - Reverse cells in a table row in html html表格行中的等距/可扩展单元格 - Evenly spaced/expandable cells in an html table row CSS&HTML:在表格行问题的开头和结尾处间隔内容 - CSS & HTML: Spacing content at the beginning and end of table row issues javascript错误,无法将单元格添加到表格行 - javascript error, cannot add cells to table row
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM