HTML caption - how to use <caption> tag

The HTML <caption> tag defines the caption or the title of a table. A table can contain 1 caption only and it must be defined after the table tag. The caption is usually center aligned but can be re-styled with CSS


The caption tag supports the global and event attributes.


<div> <table border="1"> <caption>Monthly savings</caption> <tr> <th>Month2</th> <th>Savings2</th> </tr> <tr> <td>January</td> <td>$100</td> </tr> </table> </div>