Table and its properties in HTML:

Table and its properties in HTML:

HTML TABLE: It is a combination of rows and columns. It allows web developers to store data in rows and columns. we have a <table> tag for adding a table on the webpage. Each table row starts with a <tr> and ends with a </tr> tag. For adding a heading we have a <th></th> tag. For adding data we have a <td></td> tag. Everything between <td> and </td> is the content of the table cell. we can add as many rows as we like in a table, just make sure that the number of cells is the same in each row.

Table's Properties: we have some properties like 'border', 'cellpadding', 'cellspacing', 'rowspan', 'colspan' etc for making the perfect table according to our requirements. Here, By using 'border' we add a border to the table, By using 'cellpadding' we add inside space in a cell around of content, by using 'cellspacing' we add space in the border, by using 'rowspan' we add multiple rows, by using 'colspan' we add multiple columns. Note: 'rowspan' properties are required when we have to add the same data in multiple rows and 'colspan' properties are required when we have to add the same data in multiple columns.

The output of the given code: