HTML Guides for missing cells
Learn how to identify and fix common HTML validation errors flagged by the W3C Validator — so your pages are standards-compliant and render correctly across every browser. Also check our Accessibility Guides.
A row in this table has fewer cells than its <colgroup> and <col> elements declare, so the row ends before the last column the markup defines.
Column markup sets the column count before any row is read. Each <col> adds one column, or as many as its span attribute says, and a <colgroup> with no <col> inside adds the number in its own span. A row is X columns wide when its cells add up to X, counting each cell's colspan and any cell from a row above that reaches down with rowspan. The validator reports this error once for every row narrower than the Y columns the markup declares. When no row reaches column Y at all, it also reports that table column Y established by element col (or colgroup) has no cells beginning in it.
A common cause is a column deleted from the rows while its <col> stays in the <colgroup>, for example after removing a column in a visual table editor. Without column markup, a short row only gets a warning. With it, the validator reports an error.
To fix it, make the column markup and the rows agree. If the column is gone, remove its <col> or lower the span. If the column should stay, add the missing cells to each short row, with an empty <td></td> where there is no data. A colspan on the last cell of a short row also clears this error, but when no row has a cell that starts in the last column, the validator then reports that column as having no cells.
Invalid example
The <colgroup> declares four columns, but each row has three cells:
<table>
<colgroup>
<col class="item">
<col class="size">
<col class="price">
<col class="stock">
</colgroup>
<tr>
<th>Item</th>
<th>Size</th>
<th>Price</th>
</tr>
<tr>
<td>T-shirt</td>
<td>M</td>
<td>15.00</td>
</tr>
</table>
Valid example
The <col> for the removed column is gone, so the markup declares three columns:
<table>
<colgroup>
<col class="item">
<col class="size">
<col class="price">
</colgroup>
<tr>
<th>Item</th>
<th>Size</th>
<th>Price</th>
</tr>
<tr>
<td>T-shirt</td>
<td>M</td>
<td>15.00</td>
</tr>
</table>
Validate at scale.
Ship accessible websites, faster.
Automated HTML & accessibility validation for large sites. Check thousands of pages against WCAG guidelines and W3C standards in minutes, not days.
1K Weekly
1,000 monthly checks. Cancel anytime.
Get 1K Weekly →Join teams across 40+ countries