May 03, 2021 HTML5
HTML5 labels are used to represent rows in a table. Please refer to the following example:
A simple HTML table with two columns and two rows:
<table border="1">
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
<tr>
<td>January</td>
<td>$100</td>
</tr>
</table>
All major browsers support the hashtag.
The label defines the rows in the HTML table.
An element contains one or more elements.
In HTML 5, any properties of the label in HTML 4.01 are not supported.
Property | Value | Describe |
---|---|---|
align |
right
left center justify char |
HTML5 is not supported. Defines the alignment of the contents of table rows. |
bgcolor |
rgb(x,x,x)
#xxxxxx colorname |
HTML5 is not supported. H TML 4.01 is obsolete. Specifies the background color of the table row. |
char | character | HTML5 is not supported. Specify which character to align the text against. |
charoff | number | HTML5 is not supported. Specifies the offset of the first aligned character. |
valign |
top
middle bottom baseline |
HTML5 is not supported. Specifies the vertical alignment of content in a table row. |
Labels support the global properties of HTML.
The tag supports the event properties of HTML.
The title in the table
This example shows how to display the table title.
Empty cell
This example shows how to use to work with cells without content.
Table with title
This example shows a table with a title.
The label in the table
This example shows how to display elements within other elements.
Table cells that span rows or columns
This example shows how to define table cells that span rows or columns.
HTML tutorial: HTML tables
HTML DOM Reference Manual: Tr Object