Table Cellpadding and Cellspacing

Both of them are used to adjust the white space in table cell. Cellspacing defines the width of the border, while cellpadding represents the distance between cell borders and the content within. Both attributes take numeric values in pixels as shown

<table cellpadding=” numeric_value ” cellspacing=” numeric_value “>

An example illustrating the usage of cellspacing and cellpadding in HTML table is as under:

Table Cellpadding and Cellspacing

Back to Tutorial

Table, tr, td and th tags
Colspan and Rowspan Attributes

Get industry recognized certification – Contact us

keyboard_arrow_up
Open chat
Need help?
Hello 👋
Can we help you?