Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Html: Difference between cell spacing and cell padding [closed]

What is the difference between cell spacing and cell padding?

like image 474
Explorer Avatar asked Mar 20 '13 07:03

Explorer


People also ask

Is cell padding and cell spacing the same?

Cellpadding basically defines the space present between a table cell's border and the content present in it. Cellspacing basically defines the space present between individual adjacent cells.

Why do you use cell padding and cell spacing?

Tables without adequate spacing in or around cells are difficult to read. The cell padding attribute places spacing around data within each cell. The cell spacing attribute places space around each cell in the table.

What is the difference between Cellspacing and Cellpadding explain with an example?

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.

What is meant by cell spacing in HTML?

HTML Table - Cell Spacing. Cell spacing is the space between each cell. By default the space is set to 2 pixels.


2 Answers

This is the simple answer I can give.

enter image description here

like image 134
Nayana Adassuriya Avatar answered Sep 20 '22 11:09

Nayana Adassuriya


cellspacing and 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.

like image 37
Sahil Popli Avatar answered Sep 19 '22 11:09

Sahil Popli