HTML - <tr>

The HTML element table row <tr> defines a row of cells in a table. Those can be a mix of <td> and <th> elements.

Example

 

See <table> for examples on <tr>.

Description  

The HTML element table row <tr> defines a row of cells in a table. Those can be a mix of <td> and <th> elements.

Content categories None
Permitted content Zero or more <td> or <th> elements, or a mix of them
Tag omission Start tag is mandatory. End tag may be omitted if the <tr> element is immediately followed by a <tr> element, or if the parent table group (<thead>, <tbody> or <tfoot>) element doesn't have any more content
Permitted parent elements <table>, <thead>, <tbody> or <tfoot> element
Normative document HTML, "The tr element"

Browser Compatibility  

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support 1.0 1.0 (1.7 or earlier) (Yes) (Yes) (Yes)
align/valign attribute 1.0 Not supported [1] (Yes) (Yes) (Yes)
char/charoff attribute 1.0 Not supported [2] (Yes) (Yes) (Yes)
bgcolor attribute Not supported Not supported (Yes) Not supported Not supported
Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support (Yes) 1.0 (1.0) (Yes) (Yes) (Yes)
align/valign attribute ? Not supported [1] ? ? ?
char/charoff attribute ? Not supported [2] ? ? ?
bgcolor attribute Not supported Not supported (Yes) Not supported Not supported

[1] See bug 915.

[2] See bug 2212.

See Also  

 

This element implements the HTMLTableRowElement interface.

License

© 2016 Mozilla Contributors
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-us/docs/web/html/element/tr

Element HTML HTML tabular data Reference Tables Web