In an HTML table, the cellpadding
and cellspacing
can be set like this:
For cell-padding:
Just call simple td/th
cell padding
.
Example:
/******Call-Padding**********/
table {
border-collapse: collapse;
}
td {
border: 1px solid red;
padding: 10px;
}
Head1 |
Head2 |
Head3 |
Head4 |
11 |
12 |
13 |
14 |
21 |
22 |
23 |
24 |
31 |
32 |
33 |
34 |
41 |
42 |
43 |
44 |
table {
border-collapse: collapse;
}
td {
border: 1px solid red;
padding: 10px;
}
For cell-spacing
Just call simple table
border-spacing
Example:
/********* Cell-Spacing ********/
table {
border-spacing: 10px;
border-collapse: separate;
}
td {
border: 1px solid red;
}
Head1 |
Head2 |
Head3 |
Head4 |
11 |
12 |
13 |
14 |
21 |
22 |
23 |
24 |
31 |
32 |
33 |
34 |
41 |
42 |
43 |
44 |
/********* Cell-Spacing ********/
table {
border-spacing: 10px;
border-collapse: separate;
}
td {
border: 1px solid red;
}
More table style by CSS source link here you get more table style by CSS.