Explain Table Tags in HTML?

This HTML element represents tabular data — that is, information presented in a two-dimensional table comprised of rows and columns of cells containing data.

The table tag defines an HTML table, it consists of one table element and one or more tr, th and td elements, they define a row, header cell and a standard data cell in a HTML table respectively.

A format to write all the tags:

<table>      
        <tr>
                <th>FirstName</th>
                <th>LastName</th>
                <th>Age</th>
        </tr>                       
         <tr>
                 <td>Marry</td>
                 <td>Potter</td>
                 <td>23</td>
         </tr>
 </table>

Some tags to group the elements:

thead tag is used to group header content in an HTML table. The head element is used in conjunction with tbody and tfoot elements to specify each part of the table that is header, body, and footer.

The caption tag is used to add a caption to a table and is written at the start of table tag. <caption></caption>