Basic HTML code to make a simple table
Paste the following code in note pad and save it with extension ".html"
<html>
<head>
<title>Table creation || Nested Code Publication</title>
</head>
<body>
<center><h1>::This is the Table::</h1></center>
<!-- Table will be created here -->
<center>
<table border=1>
<!-- 1st row -->
<tr>
<th>Sl No.</th>
<!-- "<th>" used for table heading -->
<th>Name</th>
<th>Roll no</th>
</tr>
<!-- 2nd row -->
<tr>
<td>1.</td>
<td>Anil Bose</td>
<td>120</td>
</tr>
<!-- 3rd row -->
<tr>
<td>2.</td>
<td>Anita Sen</td>
<td>130</td>
</tr>
<!-- 4th row -->
<tr>
<td>3.</td>
<td>Senita Gomes</td>
<td>140</td>
</tr>
</table>
</center>
</body>
</html>
HERE IS THE OUTPUT ::
No comments:
Post a Comment