The axis attribute belonged on <td> and <th>. In HTML 4 it was meant to place a cell into conceptual categories (an “axis” of related cells) so a user agent could group or query them.
Do not use it in new pages. Prefer scope on headers and headers when cells need explicit associations. For script-only categories, use data-* attributes instead.
Deprecated.
MDN lists axis as deprecated on both <td> and <th>. It is kept here for reading legacy markup and migrating tables — not for new designs.
Little real browser behavior.
Engines mostly expose the attribute in the DOM. They do not provide a useful built-in UI or screen-reader feature based on axis.
Syntax
HTML Syntax
syntax.html
<td|th axis="category-list">
Historical form only. New tables should omit axis.
Values
Attribute Values
What authors used to put in axis, and what to use now:
Value / approach
Description
Try it
Category name(s)
HTML 4: comma-separated names (e.g. expenses,meals)
In Try It Yourself, JS adds a class to data-category="meals" cells.
How It Works
Replace axis="meals" with something like data-category="meals".
Keep proper <th scope> for accessibility; data attributes are for your app logic.
Query with CSS/JS ([data-category="meals"]) the way old scripts might have read axis.
Update any legacy JS that called getAttribute("axis").
Edge Cases & Pitfalls
Treat every remaining axis as technical debt.
deprecated
Not valid for new HTML
Validators and style guides flag it. Remove on rewrite; do not copy into new components.
a11y
No substitute for real headers
Screen readers need <th>, scope, and sometimes headers — not category keywords.
migration
No 1:1 HTML replacement
Category grouping has no dedicated HTML5 attribute. Use table semantics and/or data-* + JS.
docs
Comma vs space lists
Older docs show commas; some modern notes say spaces. Irrelevant for new work — delete the attribute.
scope
Do not put scope on <td>
MDN: scope on data cells is also deprecated. Use scope on <th> only; use headers on <td> when needed.
Compatibility
Browser Support
axis is a deprecated HTML attribute on table cells. It is not a feature you should depend on in modern apps.
✓ Deprecated · Legacy only
axis
Parsers may still expose the attribute in the DOM, but there is no useful cross-browser behavior for authors. Treat support as historical.
0%Recommended for new work
Google ChromeParses · no useful UX
Legacy only
Mozilla FirefoxParses · no useful UX
Legacy only
Apple SafariParses · no useful UX
Legacy only
Microsoft EdgeParses · no useful UX
Legacy only
OperaParses · no useful UX
Legacy only
Internet ExplorerLegacy attribute
Legacy only
axisDeprecated — do not use
Bottom line: Safe only as “ignore when reading old HTML.” For new tables, use scope, headers, and clear th markup.
Remember
Key Takeaways
Was: category labels on td/th in HTML 4-era tables.
Now: deprecated — omit from new markup.
Replace a11y needs with scope and headers.
Replace script categories with data-* and updated JS.
One line: learn axis to read old tables — ship scope / headers (or data-*) instead.
Frequently Asked Questions
On td and th, it was meant to label cells with conceptual category names so user agents could group or query related cells. In practice, browsers rarely used it beyond exposing it in the DOM.
Yes. MDN lists axis as a deprecated attribute on both td and th. Do not use it in new HTML.
For header relationships, use scope on th and headers on cells that need explicit links. For custom categories in scripts, use data-* attributes and update any JavaScript that read axis.
HTML 4.01 described a comma-separated list of category names. MDN’s deprecated note describes space-separated strings. Either way, the attribute is obsolete — prefer scope and headers.
No reliable modern assistive-technology benefit. Use proper table structure with th, scope, and headers instead.
Usually the page still renders. The attribute is ignored for meaningful behavior. Clean it up when you modernize the markup.