The TABLE element defines a table, and the TR and TD elements are used to define rows and cells.
<tr>
<td>content of table</td>
</tr>
</table>
The TABLE tag <table> - </table>
Defines a table.
Defines a table.
The TR tag <tr> - </tr>
Defines a row in a table.
Defines a row in a table.
The TD tag <td> - </td>
Defines a cell in a table.
Example:-
A table of one row :
<table border="3">
<tr>
<td>Row1 - Col1</td>
<td>Row2 - Col2</td>
<td>Row3 - Col3</td>
</tr>
A table of two row :
<table border="3">
<tr>
<td>Row1 - Col1</td>
<td>Row1 - Col2</td>
<td>Row1 - Col3</td>
</tr>
<table border="3">
<tr>
<td>Row2 - Col1</td>
<td>Row2 - Col2</td>
<td>Row2 - Col3</td>
</tr>
If the Border Attribute is not specified, the border of the table is not displayed.
<table>
<tr>
<td>Row1 - Col1</td>
<td>Row1 - Col2</td>
<td>Row1 - Col3</td>
</tr>
<table>
<tr>
<td>Row2 - Col1</td>
<td>Row2 - Col2</td>
<td>Row2 - Col3</td>
</tr>
Defines a cell in a table.
Example:-
A table of one row :
<table border="3">
<tr>
<td>Row1 - Col1</td>
<td>Row2 - Col2</td>
<td>Row3 - Col3</td>
</tr>
A table of two row :
<table border="3">
<tr>
<td>Row1 - Col1</td>
<td>Row1 - Col2</td>
<td>Row1 - Col3</td>
</tr>
<table border="3">
<tr>
<td>Row2 - Col1</td>
<td>Row2 - Col2</td>
<td>Row2 - Col3</td>
</tr>
If the Border Attribute is not specified, the border of the table is not displayed.
<table>
<tr>
<td>Row1 - Col1</td>
<td>Row1 - Col2</td>
<td>Row1 - Col3</td>
</tr>
<table>
<tr>
<td>Row2 - Col1</td>
<td>Row2 - Col2</td>
<td>Row2 - Col3</td>
</tr>
0 Comments