Opens in a new tab
A picture of Jeff Brigman
I CODE TODAY FOR
A BETTER TOMORROW

Glossary Term

HTML tr element

3 tags 1 category

The <tr> HTML element defines a row of cells in a table. The row’s cells can then be established using a mix of <td> (data cell) and <th> (header cell) elements.

The <tr> element is valid as a child of a <thead>, <tbody>, or <tfoot> element only. If the <tr> is placed as a direct child of its parent <table> element, the <tbody> parent is implied and browsers will add the <tbody> to the markup. The implied <tbody> parent is only supported if the <table> otherwise has no child <tbody> elements, and only if the <tr> is included after any <caption>, <colgroup>, and <thead> elements. The CSS pseudo-classes :nth-of-type, :first-of-type, and :last-of-type are often useful for selecting the desired set of rows and their data and header cells (<td> and <th> elements). When a <tr> is included as a direct child of the <table>, as the browser adds a <tbody> to the markup, CSS selectors such as table > tr may not work as expected or at all.

Term Connections

Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.

Loading term connections…