What's the difference between a cell-spacing and a cell-padding?

 Posted by vishalneeraj-24503 on 10/8/2014 | Category: CSS 3 Interview questions | Views: 638 | Points: 40
Answer:

Although both is used for formatting purposes but there is a major difference between cell-padding and cell-spacing.A cell padding is used to set extra space which is used to separate cell walls from their contents.
Whereas a cell spacing is used to set space between cells.

For Example:-
<table width = "100%" border = "1" cellspacing = "5">


We can also apply both cell-spacing and cell-padding together as:-

<table width = "100%" border = "1" cellpadding = "5" cellspacing = "5">


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response