Skip to main content
HTML Validation

Bad value “” for attribute “rowspan” on element “td”: The empty string is not a valid non-negative integer.

About This HTML Issue

The rowspan attribute on a <td> must hold a whole number from 0 to 65534, so leaving it empty is an error.

A bare rowspan with no value counts as empty and gets the same message. A value made of spaces, or a negative number like -1, gets a different error that starts with "Expected a digit".

Empty rowspan attributes often come from table plugins and page builders that write both span attributes on every cell and leave them blank when no cells were merged. Check the same cells for colspan="", which the validator reports in its own message ending in "not a valid positive integer".

Browsers read an empty rowspan as 1, the same as no attribute, so deleting it leaves the table unchanged. Don't reach for rowspan="0" as a replacement: it is valid, unlike colspan="0", but it stretches the cell down through every remaining row of its <thead>, <tbody> or <tfoot>. Write the attribute only on cells that cover two or more rows.

Invalid example

<table>
  <tr>
    <th>Day</th>
    <th>Time</th>
    <th>Session</th>
  </tr>
  <tr>
    <td rowspan="2">Monday</td>
    <td rowspan="">9:00</td>
    <td rowspan="">Welcome</td>
  </tr>
  <tr>
    <td>11:00</td>
    <td>Workshop</td>
  </tr>
</table>

Valid example

<table>
  <tr>
    <th>Day</th>
    <th>Time</th>
    <th>Session</th>
  </tr>
  <tr>
    <td rowspan="2">Monday</td>
    <td>9:00</td>
    <td>Welcome</td>
  </tr>
  <tr>
    <td>11:00</td>
    <td>Workshop</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