In this article, you will learn how to add a border to a table in HTML
<!DOCTYPE html>
<html>
<head>
<style>
table, th, td {
border: 1px solid black;
}
</style>
</head>
<body>
<h2>Add a border to a table:</h2>
<table>
<tr>
<th>First Name</th>
<th>Last Name</th>
</tr>
<tr>
<td>Joy</td>
<td>Jelly</td>
</tr>
<tr>
<td>Good</td>
<td>OK</td>
</tr>
</table>
Add a border to a table in HTML
minify code