How To Add a Border
<!DOCTYPE html>
<html>
<head>
<style>
table, th, td {
border: 1px solid black;
}
</style>
</head>
<body>
<h2>Table With Border</h2>
<p>Use the CSS border property to add a border to the table.</p>
<table style="width:100%">
<tr>
<th>Firstname</th>
<th>Lastname</th>
<th>Age</th>
</tr>
<tr>
<td>sushil</td>
<td>yadav</td>
<td>23</td>
</tr>
<tr>
<td>pratiksha</td>
<td>Srivastava</td>
<td>20</td>
</tr>
<tr>
<td>surbhi</td>
<td>singh</td>
<td>22</td>
</tr>
</table>
</body>
</html>
Comments
Post a Comment