HTML <caption> tag
HTML <caption> tag
The <caption>
tag defines a caption to an HTML table.
Note: A <caption>
element must appear in an HTML document as the first descendant of a parent <table>.
Example
HTML Online Editor
<!DOCTYPE html>
<html>
<body>
<table>
<caption>Total Fund List</caption>
<tr>
<th>Name</th>
<th>Funded</th>
<th>Total Funds</th>
</tr>
<tr>
<td>Brendan</td>
<td>$500</td>
<td rowspan="2">$1200</td>
</tr>
<tr>
<td>Eich</td>
<td>$700</td>
</tr>
</table>
</body>
</html>
Attributes
There is no special attributes for <caption> tag. Only Global attributes.
Deprecated Attributes
The following attribute should not be used in any case.
Attribute | Value | Explanation |
---|---|---|
align |
| Specifies how the caption must be aligned with respect to the table. |
Reminder
Hi Developers, we almost covered 99.5% of HTML Tutorials with examples for quick and easy learning.
We are working to cover every Single Concept in HTML.
Please do google search for:
Join Our Channel
Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.
This channel is primarily useful for Full Stack Web Developer.