The <tr> element defines a row of cells in a <table>. Fill each row with <td> data cells and/or <th> header cells.
Place rows inside <thead>, <tbody>, or <tfoot> when you can. A <tr> put directly under <table> still works — the browser implies a <tbody>.
Baseline · Widely available.
The element itself is not deprecated. Stable across browsers since about July 2015 (and much earlier in practice).
Deprecated attributes.
Do not use align, bgcolor, char, charoff, or valign on <tr>. Prefer CSS text-align, background-color, and vertical-align.
Syntax
HTML Syntax
syntax.html
<tr><th>/<td>…</tr>
The start tag is required. The end tag may be omitted if the next sibling is another <tr>, or if the row is the last child of its thead / tbody / tfoot. Beginners should write both tags.
Reference
Attributes
Modern <tr> has no useful element-specific attributes — only globals. These legacy attributes remain for reference:
CSS like tr:nth-of-type can stripe body rows more reliably when groups are explicit.
Edge Cases & Pitfalls
Most tr bugs are wrong parents, missing cells, or styling with deprecated attributes.
parent
Only under table groups
Valid parents are thead, tbody, tfoot, or table (which implies tbody). Do not put tr in a div.
selectors
table > tr may fail
When the browser inserts an implied tbody, rows are no longer direct children of table. Prefer tbody tr or explicit groups.
a11y
Label columns and rows
Use <th> with scope so screen readers can announce headers for each cell.
style
Style with CSS, not presentational attributes
Skip deprecated align / bgcolor / valign. Stripe rows with :nth-of-type when helpful.
Compatibility
Browser Support
The <tr> element is core HTML for tables in every browser. It is not a Node.js, Deno, or Bun API.
✓ Baseline · Widely available
<tr>
Widely available since about July 2015 (and long before). All major browsers support table rows; deprecated presentational attributes should be avoided.
99%Global support (approx.)
Google ChromeAll
Full support
Mozilla FirefoxAll
Full support
Apple SafariAll
Full support
Microsoft EdgeAll
Full support
OperaAll
Full support
Samsung InternetAll
Full support
Internet ExplorerAll
Supported
<tr>Universally supported
Bottom line: Safe everywhere for table rows. Prefer thead/tbody structure, th with scope, and CSS instead of deprecated row attributes.
Remember
Key Takeaways
Role:<tr> is one horizontal row of table cells.
Cells: fill rows with th and/or td.
Structure: prefer thead / tbody / tfoot groups.
Style: skip deprecated align / bgcolor — use CSS.
One line: wrap each table row in <tr> and fill it with th/td cells.