Border spacing refers to the space between two adjacent cells in a table. In CSS the border-spacing property is used to specify the space between adjacent cells in a table.
Now here We create a Web page name is tableborderspacing.html to specify border spacing in a table.
<!doctype html>
<head>
<h1>Working with the border-spacing property</h1>
<table border=1 style="border-collapse:separate;border-spacing:15px;">
<tr>
<th>S. No.</th>
<th>E-Name</th>
<th>E-age</th>
</tr>
<tr>
<td>01</td>
<td>kumar</td>
<td>35</td>
</tr>
<tr>
<td>02</td>
<td>sharma</td>
<td>36</td>
</tr>
</table>
<br>
<table border=2 style="border-collapse:separate;border-spacing:10px 50px;">
<tr>
<th>S. No.</th>
<th>E-Name</th>
<th>E-age</th>
</tr>
<tr>
<td>01</td>
<td>kumar</td>
<td>35</td>
</tr>
<tr>
<td>02</td>
<td>sharma</td>
<td>36</td>
</tr>
</table>
</body>
</html>
The border-spacing property specifies the distance between the borders of adjacent cells table first and second.
The output of the above Web page is:
Now here We create a Web page name is tableborderspacing.html to specify border spacing in a table.
<!doctype html>
<head>
<h1>Working with the border-spacing property</h1>
<table border=1 style="border-collapse:separate;border-spacing:15px;">
<tr>
<th>S. No.</th>
<th>E-Name</th>
<th>E-age</th>
</tr>
<tr>
<td>01</td>
<td>kumar</td>
<td>35</td>
</tr>
<tr>
<td>02</td>
<td>sharma</td>
<td>36</td>
</tr>
</table>
<br>
<table border=2 style="border-collapse:separate;border-spacing:10px 50px;">
<tr>
<th>S. No.</th>
<th>E-Name</th>
<th>E-age</th>
</tr>
<tr>
<td>01</td>
<td>kumar</td>
<td>35</td>
</tr>
<tr>
<td>02</td>
<td>sharma</td>
<td>36</td>
</tr>
</table>
</body>
</html>
The border-spacing property specifies the distance between the borders of adjacent cells table first and second.
The output of the above Web page is:
No comments:
Post a Comment