The <tr>
HTML tag is used to create a new row in a table. This tag can be used alone or in combination with other tags such as <td>
and <th>
. The <tr>
tag is part of the HTML Table elements that allow developers to create a structured layout for displaying data in a tabular format.
Code Example:
<table>
<tr>
<td>Cell 1</td>
<td>Cell 2</td>
</tr>
<tr>
<td>Cell 3</td>
<td>Cell 4</td>
</tr>
</table>
Attributes:
align
: Specifies the horizontal alignment of the table data. Values include left, right, center.valign
: Specifies the vertical alignment of the table data. Values include top, middle, bottom, and baseline.char
: Specifies a character used for cell justification.charoff
: Specifies the number of characters from the edge of the cell to align with the character specified in the char attribute.scope
: Specifies whether the header is associated with the row or column of cells. Values include row and col.