Both of them are used to adjust the white space in table cell. Cellspacing defines the width of the border, while cellpadding represents the distance between cell borders and the content within. Both attributes take numeric values in pixels as shown
<table cellpadding=” numeric_value ” cellspacing=” numeric_value “>
An example illustrating the usage of cellspacing and cellpadding in HTML table is as under: