May 03, 2021 HTML5
Html5 is used to define a title for a table, using the following example:
Table with title:
<table border="1">
<caption>Monthly savings</caption>
<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 title of the table.
The label must be placed directly after the label.
You can define only one title for each table.
Tip: Usually this title is centered on the table. However, the CSS properties text-align and caption-side can be used to set the alignment and display position of the title.
HTML5 does not support the align property.
HTML 4.01 has discarded the align property.
Property | Value | Describe |
---|---|---|
align
(abandoned)
|
left
right top bottom |
HTML5 is not supported. H TML 4.01 is obsolete. Defines the alignment of the title. |
Description of use: When the element is the parent element of the element, and the caption is the sole descendant of the element, replace the caption element with the element
The label supports the global properties of HTML.
The tag supports the event properties of HTML.