Macro laby::tr

source ·
tr!() { /* proc-macro */ }
Expand description

<tr> element.

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.

To provide additional control over how cells fit into (or span across) columns, both <th> and <td> support the colspan attribute, which lets you specify how many columns wide the cell should be, with the default being 1. Similarly, you can use the rowspan attribute on cells to indicate they should span more than one table row.

This can take a little practice to get right when building your tables. We have some examples below, but for more examples and an in-depth tutorial, see the HTML tables series in our Learn web development area, where you’ll learn how to use the table elements and their attributes to get just the right layout and formatting for your tabular data.