Html: Difference between cell spacing and cell padding
Solution 1
This is the simple answer I can give.
Solution 2
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.
Solution 3
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.
Solution 4
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*
Related videos on Youtube
Explorer
Updated on November 23, 2020Comments
-
Explorer over 3 years
What is the difference between cell spacing and cell padding?
-
Pranav about 11 yearstry difference between cell spacing and cell padding on google.com
-
Vikas Gautam about 11 yearscellspacing is the space between the cell wall and cell padding expand the cell wall not give space
-
dfsq about 11 yearsEasy to illustrate: jsfiddle.net/QWRM6
-
CigarDoug over 6 yearsFunny 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?
-
lkamal over 6 yearscellspacing : 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 digizol.com/2008/08/cellspacing-vs-cellpadding-table.html
-
RBT about 3 yearsRelated post - Set cellpadding and cellspacing in CSS?
-
-
Grijesh Chauhan about 10 yearsSo is there any difference between
Cellspacing
andmargin
of cell.