What are the differences between cell spacing and cell padding?

Cell Padding:

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.



The general format of specifying cell spacing is as follows:


< table width="100" border="2" cellspacing="20">



One can also apply cell spacing and cell padding together. It is done as follows:


< table width="100" border="2" cellpadding="5" cellspacing =”20”>

Questions by GeekAdmin   answers by GeekAdmin

Showing Answers 1 - 0 of 0 Answers

Balakrishnan

  • Nov 30th, 2006
 

Hi Cellpadding: it is used to increase the size of cells. Cellspacing:it is used to make space between cells.

  Was this answer useful?  Yes

Minnat

  • Jun 11th, 2007
 

CELLSPACING controls the space between table cells.
CELLPADDING sets the amount of space between the contents of the cell and the cell wall.

  Was this answer useful?  Yes

Sujatars

  • Jul 30th, 2007
 

Cell Spacing is used to set space between different table cells

Cell Padding is used for formatting the space  needed between the edges of the cell and the content of the cell.

  Was this answer useful?  Yes

prince kumar

  • Mar 31st, 2012
 

Cell spacing is not uses for future and cell padding is uses by future.

  Was this answer useful?  Yes

malikbilal

  • Apr 4th, 2012
 

Cell spacing:Cell spacing controls the space between table cells by defining the pixel width between them

Cell padding:Cell padding controls the amount of space between the contents of the cell (text, images, etc) from the cell wall

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions