HTML
Hypertext Markup Language
The border can be used to apply around your table. To mention width of the border need to use number.
For the border thin use the number 1. If need to apply thickness border, use a greater number.
HTML Code
<html>
<head>
<title>table</title>
</head>
<body>
<table border="4" width="400" height="300">
<caption> Basic Fruit Comparison Chart </caption>
<tr>
<th width="200" align="center">Fruit</th> <th width="200" align="center">Color</th> </tr>
<tr>
<td align="center">Apple</td> <td align="center">Red</td> </tr>
<tr>
<td align="center">Avocado</td> <td align="center">Green</td> </tr>
<tr>
<td align="center">Watermelon</td> <td align="center"> Pink</td> </tr>
</table> </body>
</html>
<head>
<title>table</title>
</head>
<body>
<table border="4" width="400" height="300">
<caption> Basic Fruit Comparison Chart </caption>
<tr>
<th width="200" align="center">Fruit</th> <th width="200" align="center">Color</th> </tr>
<tr>
<td align="center">Apple</td> <td align="center">Red</td> </tr>
<tr>
<td align="center">Avocado</td> <td align="center">Green</td> </tr>
<tr>
<td align="center">Watermelon</td> <td align="center"> Pink</td> </tr>
</table> </body>
</html>
Output
Fruit | Color |
---|---|
Apple | Red |
Avocado | Green |
Watermelon | Pink |