HTML table allows to arrange data into rows and columns.
- Each table row starts with a
<tr>
and ends with a</tr>
tag. - Each table cell is defined by a
<td>
and a</td>
tag. - For table header cells, it can be used
<th>
tag instead of the<td>
tag.
1<table>
2 <tr>
3 <th>Name</th>
4 <th>Country</th>
5 <th>City</th>
6 </tr>
7 <tr>
8 <td>Germano Roberto</td>
9 <td>Italy</td>
10 <td>Venice</td>
11 </tr>
12 <tr>
13 <td>Mariela Valentina</td>
14 <td>Spain</td>
15 <td>Barcelona</td>
16 </tr>
17</table>
Sample Output
Name | Country | City |
---|---|---|
Germano Roberto | Italy | Venice |
Mariela Valentina | Spain | Barcelona |