HTML
Hypertext Markup Language
The Cellpadding attribute sets the distance in pixels between a table cell's outer border and the point at which content begins.
HTML Code
<html>
<head>
<title>table</title>
</head>
<body>
<table border="1" cellpadding ="5">
<caption> Basic Fruit Comparison Chart </caption>
<tr>
<th>Fruit</th> <th>Color</th> </tr>
<tr>
<td>Apple</td> <td>Red</td> </tr>
<tr>
<td>Avocado</td> <td>Green</td> </tr>
<tr>
<td>Watermelon</td> <td>Pink</td> </tr>
</table> </body>
</html>
<head>
<title>table</title>
</head>
<body>
<table border="1" cellpadding ="5">
<caption> Basic Fruit Comparison Chart </caption>
<tr>
<th>Fruit</th> <th>Color</th> </tr>
<tr>
<td>Apple</td> <td>Red</td> </tr>
<tr>
<td>Avocado</td> <td>Green</td> </tr>
<tr>
<td>Watermelon</td> <td>Pink</td> </tr>
</table> </body>
</html>
Output