cellspacing css code example
Example 1: how to add space tp table contents html css
table{
border-collapse:separate;
border-spacing: 0 15px;
}
th{
background-color: #4287f5;
color: white;
}
th,td{
width: 150px;
text-align: center;
border: 1px solid black;
padding: 5px;
}
h2{
color: #4287f5;
}
Example 2: Set table cellpadding and cellspacing in CSS
td {
padding: 10px; /* cellpadding */
}
table {
border-spacing: 10px; /* cell spacing */
border-collapse: separate;
}