What is the difference between cell spacing and cell padding?
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.
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.
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.
HTML Table - Cell Spacing. Cell spacing is the space between each cell. By default the space is set to 2 pixels.
This is the simple answer I can give.
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 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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With