Introduction To Tables
Introduction To Tables
TO TABLES
EXERCISE FOR HTML
Tables
<table>
<tr> <!-- Row -->
<th>Header 1</th>
<th>Header 2</th>
</tr>
<tr>
<td>Data 1</td>
<td>Data 2</td>
</tr>
</table>
Sample Code
<table border="1">
<tr>
<th>Name</th>
<th>Age</th>
<th>City</th>
</tr>
<tr>
<td>John</td>
<td>25</td>
<td>New York</td>
</tr>
<tr>
<td>Lisa</td>
<td>22</td>
<td>Los Angeles</td>
</tr>
</table>
<table border="1">
Nested Tables <tr>
<th>Category</th>
Definition: It is a table inside a table <th>Details</th>
</tr>
<tr>
<td>Fruits</td>
<td>
<table border="1">
<tr>
<td>Apple</td>
</tr>
<tr>
<td>Banana</td>
</tr>
</table>
</td>
</tr>
</table>
Exercise