How to use Cellpadding and Cellspacing Attributes in HTML code.?
1874
12-Oct-2016
Aryan Kumar
27-Apr-2023In HTML, cellpadding and cellspacing are attributes that can be used to control the amount of space between cells in an HTML table.
Here's how you can use these attributes in your HTML code:
Example:
Example:
Note that using cellpadding and cellspacing attributes is not recommended in modern HTML development, as it is better to use CSS to control the spacing and padding of table cells. However, these attributes can still be used for backward compatibility with older browsers or for specific use cases where CSS is not available or feasible.
Ailsa Singh
12-Oct-2016Cellpadding and Cellspacing Attributes in HTML code.
It is used to adjust the spaces of the table.
CellSpacing : It is used to define the width of the border
CellPadding : it is used to define the distance between the border and content within the cell