We would like to know how to add margin to the table td.
<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
table {<!--from w w w .j a va 2 s . c o m-->
border-collapse: separate;
border-spacing: 10px 10px;
}
td {
background-color: #eee;
margin: 5px;
padding: 5px;
}
</style>
</head>
<body>
<table>
<tr>
<td>hi</td>
<td>hello</td>
</tr>
</table>
</body>
</html>
The code above is rendered as follows: