CSS Portal

HTML <tr> Tag

☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee
<tr>
HTML TagThis tag is supported by all modern browsers.
Updated 26th December 2025

Description

The <tr> HTML element defines a table row in an HTML table. It is used within a <table> element to group a set of table cells (<td> for data cells or <th> for header cells) into a single horizontal row. Each <tr> represents one row of the table, and the content of the row is defined by the cells contained inside it.

A <tr> can contain any combination of <td> and <th> elements. Typically, <th> elements are used for header rows, while <td> elements are used for standard data rows. The visual presentation of the row, such as borders, background colors, and text alignment, can be controlled with CSS.

Rows in a table are displayed in the order they appear in the HTML document, starting from the top of the table. Multiple <tr> elements can be grouped inside <thead>, <tbody>, or <tfoot> elements to semantically organize the table into sections, which can be useful for styling, scripting, or accessibility purposes.

In essence, <tr> acts as a container for cells, structuring the table horizontally and allowing for clear, organized representation of tabular data.

Properties

Permitted Parents
<table> (only if the table has no child <tbody> element, and even then only after any <caption>, <colgroup>, and <thead> elements); otherwise, the parent must be <thead>, <tbody> or <tfoot>
Content
<th>, <td>
Start/End Tags
Start tag: optional, End tag: optional

Example

<table border="1">
<tr>
<td>Cat</td>
<td>Dog</td>
</tr>
<tr>
<td>Mouse</td>
<td>Bird</td>
</tr>
</table>
Open in editor

Attributes

None

Global Attributes

The <tr> tag also supports the Global Attributes in HTML5

Event Attributes

The <tr> tag also supports the Event Attributes in HTML5

Browser Support

The following information will show you the current browser support for the HTML <tr> tag. Hover over a browser icon to see the version that first introduced support for this HTML tag.

This tag is supported by all modern browsers.

Desktop

Chrome
Edge
Firefox
Opera
Safari

Tablets & Mobile

Chrome Android
Firefox Android
Opera Android
Safari iOS
Samsung Internet
Android WebView
-
Supported Unknown Not supported
☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee