What is the difference between cell spacing and cell padding?
-
2try difference between cell spacing and cell padding on google.com – Pranav Mar 20 '13 at 07:27
-
cellspacing is the space between the cell wall and cell padding expand the cell wall not give space – Vikas Gautam Mar 20 '13 at 07:28
-
3Easy to illustrate: http://jsfiddle.net/QWRM6/ – dfsq Mar 20 '13 at 07:32
-
2Funny thing, this is now the highlighted answer on google. I needed to remind myself of the difference. I googled it. This was the highlighted answer on google, and it answered my question. So, why isn't it a valid question? – CigarDoug Nov 08 '17 at 12:22
-
cellspacing : space between cells; cellpadding : space between the cell border and it's content. So try to think about cellspacing as "cell-spacing or space between cells". But cellpadding is "how much padding is added inside the cell to limit the space left for text inside". For a quick demo with HTML code, have a look at here http://www.digizol.com/2008/08/cellspacing-vs-cellpadding-table.html – lkamal Nov 13 '17 at 19:54
-
Related post - [Set cellpadding and cellspacing in CSS?](https://stackoverflow.com/q/339923/465053) – RBT Mar 19 '21 at 11:58
5 Answers
Cell padding
is used for formatting purpose which is used to specify the space needed between the edges of the cells and also in the cell contents. The general format of specifying cell padding is as follows:
< table width="100" border="2" cellpadding="5">
The above adds 5 pixels of padding inside each cell .
Cell Spacing:
Cell spacing is one also used f formatting but there is a major difference between cell padding and cell spacing. It is as follows: Cell padding is used to set extra space which is used to separate cell walls from their contents. But in contrast cell spacing is used to set space between cells.

- 1
- 1

- 1,967
- 14
- 21
Cellpadding
is the amount of space between the outer edges of the
table cell and the content of the cell.
Cellspacing
is the amount of space in between the individual table cells.
More Details *Link 1*

- 31,410
- 17
- 69
- 97
CellSpacing as the name suggests it is the Space between the Adjacent cells and CellPadding on the other hand means the padding around the cell content.

- 2,765
- 23
- 30
Cell spacing and margin is the space between cells.
Cell padding is space inside cells, between the cell border (even if invisible) and the cell content, such as text.

- 141,631
- 28
- 261
- 374
-
So is there any difference between `Cellspacing` and `margin` of cell. – Grijesh Chauhan Mar 06 '14 at 06:56