Tables
HTML <tr> element
Groups cells into a table row. Use th and td for the cells. A row is a container for cells, not arbitrary flow content directly. Use colspan or rowspan on the cells to represent spanning data rather than adding empty cells for layout. It accepts global HTML attributes; individual global features may be inapplicable or restricted.
Formal Syntax & Structure
html syntaxhtml
<tr> <td>Data</td></tr>Return Value
HTMLTableRowElement
Content model: td, th and script-supporting elements.
Working Example
Example Snippethtml
<!doctype html><html lang="en"> <head> <meta charset="utf-8"> <title>HTML example</title> </head> <body> <table> <tr> <th scope="col">Item</th> </tr> <tr> <td>Book</td> </tr> </table> </body></html>