Ask a Question

What are the differences between CELLPADDING & CELLSPACING property of a table in HTML????


Administrator

on 2010-12-01 10:30:00  

The TABLE tag has two properties known as CELLSPACING and CELLPADDING. CELLSPACING is the pixel width between the individual data cells in the TABLE. (The thickness of the lines makeing the TABLE grid). The default is zero. If the BORDER is set at 0, the CELLSPACING lines will be invisible. CELLPADDING is the pixel space between the cell contents and the cell border. The default for this property is also zero. This feature is not used often, but sometimes comes in handy when you have your borders turned on and you want the contents to be \"away\" from the border a bit for easy viewing. CELLPADDING is invisible, even with the BORDER property turned on.