![]() |
HTML Table Padding & Spacing facilitates the inclusion of the padding inside the cells, along with providing the spacing between the cells. It helps to define the layout and appearance of tables. The Cell Padding is used to define the space between the cell text and the cell border. Cell Spacing is used to define the space between each cell with the help of the CSS border-spacing property. Table of Content Cell PaddingTable Cell Padding refers to the space between the content of a table cell and its inner border. It is controlled using the padding property applied to the <td> (table data) or <th> (table header) elements. We have used the CSS padding property. Note: The browser’s default property for the padding is 0. Supported AttributeExample: Illustration of HTML Table Cell Padding using the CSS padding property.
Output: Cell SpacingHTML Table Cell Spacing defines the space between the cells within a table. It includes both horizontal and vertical spacing. We have used the CSS border-spacing property. Note: The browser’s default property for the Spacing is 2px. Supported AttibuteExample: Illustration of HTML Table Cell Spacing using the CSS border-spacing property.
Output: HTML Table DOM Property
|
Reffered: https://www.geeksforgeeks.org
HTML |
Related |
---|
![]() |
![]() |
|
![]() |
![]() |
Type: | Geek |
Category: | Coding |
Sub Category: | Tutorial |
Uploaded by: | Admin |
Views: | 14 |