Advertisements
<!DOCTYPE html>
<html>
<title>Example of table
</title>
<body>
<h1>Example of table</h1>
<table border="1">
<tr>
<th>First Name</th>
<th>Last Name</th>
<th>Points</th>
</tr>
<tr>
<th>Ratan</th>
<td>Das</td>
<td>1300</td>
</tr>
<tr>
<th>Pinaki</th>
<td>Sarkar</td>
<td>600</td>
</tr>
<tr>
<th>Suman</th>
<td>Bose</td>
<td>900</td>
</tr>
</table>
</body>
</html>
<html>
<title>Example of table
</title>
<body>
<h1>Example of table</h1>
<table border="1">
<tr>
<th>First Name</th>
<th>Last Name</th>
<th>Points</th>
</tr>
<tr>
<th>Ratan</th>
<td>Das</td>
<td>1300</td>
</tr>
<tr>
<th>Pinaki</th>
<td>Sarkar</td>
<td>600</td>
</tr>
<tr>
<th>Suman</th>
<td>Bose</td>
<td>900</td>
</tr>
</table>
</body>
</html>
Output
Describe HTML
Tables
Tables are defined with the <table>.........</table>
tag.
A table is divided into rows with
the <tr>.....</tr> tag. (tr stands for table row)
A row is divided into data cells
with the <td> ......</td>tag. (td stands for table data)
A row can also be divided into
headings with the <th>......</th> tag. (th stands for table heading)
The <td> elements are the data
containers in the table.The <td> elements can contain
all sorts of HTML elements like text, images, lists, other tables, etc.
Advertisements
Our Social Link