HTML <tr> Tag
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
Example
Attributes
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
Tablets & Mobile
Last updated by CSSPortal on: 26th December 2025
