Skip to main content
HTML Validation

The “name” attribute is never allowed on the “td” element.

About This HTML Issue

The name attribute is not a valid attribute for the <td> element in HTML.

The name attribute was never part of any HTML specification for table cells. Some older browsers tolerated it as a way to create anchor targets within a table, but validators reject it because it does not belong on <td>. If the goal is to create a link target so users can jump to a specific cell, use the id attribute instead. The id attribute is a global attribute, valid on any HTML element, and works as a fragment identifier in URLs (e.g., page.html#cell1).

If the name attribute was being used for JavaScript access, switch to id and use document.getElementById(), or use a data-* attribute for storing custom metadata.

Invalid example

<table>
  <tr>
    <td name="cell1">Data</td>
  </tr>
</table>

Valid example

Using id as a fragment target:

<table>
  <tr>
    <td id="cell1">Data</td>
  </tr>
</table>

If custom metadata is needed rather than a link target, a data-* attribute works:

<table>
  <tr>
    <td data-name="cell1">Data</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
$7 / 7 days

Pro Trial

Full Pro access. Cancel anytime.

Start Pro Trial →

Join teams across 40+ countries