Skip to main content
HTML Validation

Table columns in range X…Y established by element “col” have no cells beginning in them.

About This HTML Issue

The <col> elements in this table declare more columns than the rows use, and no <td> or <th> begins in the reported range.

Each <col> inside a <colgroup> adds one column to the table, or as many columns as its span attribute says, so <col span="4"> declares four. The HTML table model requires every column to have at least one cell that starts in it. A cell that only crosses a column through colspan doesn't count. With <col span="4"> and rows made of <th colspan="4">, or of <td> followed by <td colspan="3">, cells start only in columns 1 and 2, and the validator reports columns 3 and 4 together as the range 3…4.

This often happens in layout tables that declare a fine grid in the <colgroup> and then merge those columns with colspan in every row. It also happens when the rows are shorter than the column markup, which adds a second error: "A table row was 2 columns wide, which is less than the column count established using column markup (4)". When only one column is empty, the validator names that single column ("Table column 4") instead of a range.

To fix it, declare only the columns the rows use. Remove <col> elements or lower their span, and reduce the colspan values to match. Deleting the <colgroup> alone isn't enough: the oversized colspan then creates the empty columns itself, and the validator reports them as established by th or td instead.

Invalid example

The <col> declares four columns, but cells start only in the first two:

<table>
  <colgroup>
    <col span="4">
  </colgroup>
  <tr>
    <th colspan="4">Opening hours</th>
  </tr>
  <tr>
    <td>Monday</td>
    <td colspan="3">9:00 to 17:00</td>
  </tr>
</table>

Valid example

Two columns in the <colgroup>, and a cell starts in each of them:

<table>
  <colgroup>
    <col class="day">
    <col class="hours">
  </colgroup>
  <tr>
    <th colspan="2">Opening hours</th>
  </tr>
  <tr>
    <td>Monday</td>
    <td>9:00 to 17: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