.png)
The <table> tag in HTML is used to create tables, which organize data into rows and columns. Tables are composed of several related tags to define the structure of the table.
Explanation of Tags:
<table>: Defines the table.
<tr>: Defines a table row.
<th>: Defines a table header. The content inside is usually bold and centered.
<td>: Defines a table cell. Cells are the data points within the table.
Example:
<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>Jane</td>
<td>30</td>
<td>Los Angeles</td>
</tr>
</table>
Explanation of Attributes:
border: (Optional) Specifies the width of the border around the table and its cells. For example,
border="1" creates a thin border.
Cellpadding: To use increase the cell width and height.
Cellspacing: to use finshed the space between cells
0 Comments