Skip to main content
HTML Validation

A table row was X columns wide, which is less than the column count established using column markup (Y).

About This HTML Issue

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>

Find issues like this automatically

Rocket Validator scans thousands of pages in seconds, detecting HTML issues across your entire site.

Help us improve our guides

Was this guide helpful?
๐ŸŒ Trusted by teams worldwide

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.

Scheduled Reports
API Access
Open Source Standards
โ‚ฌ5 / week

1K Weekly

1,000 monthly checks. Cancel anytime.

Get 1K Weekly โ†’

Join teams across 40+ countries