Cellpadding specifies the space between the border of a table cell and its contents (i.e) it defines the whitespace between the cell edge and the content of the cell.
<table cellpadding="value" >.....</table> where, value determines the padding (space between the border of a table and its content)
Cellspacing specifies the space between cells (i.e) it defines the whitespace between the edges of the adjacent cells.
<table cellspacing="value" >.....</table> where, value determines the padding (space between adjacent cells)
Difference between cellpadding and cellspacing:
|It specifies the space between the border of a table cell and its contents.||It specifies the space between adjacent cells.|
|It is created by using HTML <table> tag but type attribute is set to cellpadding.||It is also created by using HTML <table> tag but type attribute is set to cellspacing.|
|It is mainly meant for a single cell.||Cellspacing can get subjected to more than one cell.|
|The default cellpadding value is 1||Whereas, the default cellspacing value is 2|
|Cellpadding is widely used and considered to be an effective mean||Cellspacing is less effective than Cellpadding.|
|Cellpadding is an attribute||Cellspacing is also an attribute.|
- Set cellpadding and cellspacing in CSS
- HTML | <table> cellspacing Attribute
- HTML | <table> cellpadding Attribute
- What is the difference between MEAN.js and MEAN.io?
- What is the difference between (NaN != NaN) & (NaN !== NaN)?
- Difference between “!==” and “==!” in PHP
- Difference between ASP and ASP.NET
- Difference between JSP and ASP
- Web 1.0, Web 2.0 and Web 3.0 with their difference
- Difference Between Node.js and Asp.net
- What is the difference between the | and || or operator in php?
- Difference between HTML and CSS
- Difference between ReactJS and Vue.js
- Difference between array() and  in PHP
- What is the difference between Perl and PHP ?
- Difference between npm and yarn
- What is the difference between CSS and SCSS ?
- Difference between "." and "#" selector in CSS
- Difference Between HTML and ASP
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.