HTML <table> cellpadding Attribute Last Updated : 11 Jul, 2025 Comments Improve Suggest changes 5 Likes Like Report The HTML <table> cell padding Attribute is used to specify the space between the cell content and cell wall. The cellpadding attribute is set in terms of pixels. By default, the padding is set to 0. Note: The <table> cellpadding Attribute is not supported by HTML5. Syntax:<table cellpadding="pixels">Attribute Values:pixels: It holds the space between the cell content and cell wall in terms of pixels. Example 1: In this example, we will see the implementation of table cell padding with an example. html <!DOCTYPE html> <html> <head> <title> HTML table cellpadding Attribute </title> </head> <body> <h1>GeeksforGeeks</h1> <h2> HTML table cellpadding Attribute </h2> <table border="1" cellpadding="15"> <caption>Author Details</caption> <tr> <th>NAME</th> <th>AGE</th> <th>BRANCH</th> </tr> <tr> <td>BITTU</td> <td>22</td> <td>CSE</td> </tr> <tr> <td>RAM</td> <td>21</td> <td>ECE</td> </tr> </table> </body> </html> Output: Example 2: In this example, we will see the implementation of table cell padding with another example. HTML <!DOCTYPE html> <html> <head> <title> HTML table cellpadding Attribute </title> </head> <body> <h1>Company Employees</h1> <h2> Employee Details </h2> <table border="1" cellpadding="40"> <caption>Employee Information</caption> <tr> <th>Employee ID</th> <th>Name</th> <th>Position</th> </tr> <tr> <td>001</td> <td>John Doe</td> <td>Software Engineer</td> </tr> <tr> <td>002</td> <td>Jane Smith</td> <td>UX Designer</td> </tr> </table> </body> </html> Output: Supported Browsers:Google Chrome 1 Edge 12Firefox 1Safari 3Opera 12.1 Create Quiz Comment J jit_t Follow 5 Improve J jit_t Follow 5 Improve Article Tags : Web Technologies HTML HTML-Attributes Explore HTML BasicsHTML Introduction4 min readHTML Editors4 min readHTML Basics7 min readStructure & ElementsHTML Elements4 min readHTML Attributes7 min readHTML Headings3 min readHTML Paragraphs3 min readHTML Text Formatting4 min readHTML Block and Inline Elements3 min readHTML Charsets4 min readListsHTML Lists3 min readHTML Ordered Lists5 min readHTML Unordered Lists4 min readHTML Description Lists3 min readVisuals & MediaHTML Colors11 min readHTML Links Hyperlinks2 min readHTML Images7 min readHTML Favicon4 min readHTML Video4 min readLayouts & DesignsHTML Tables9 min readHTML Iframes4 min readHTML Layout4 min readHTML File Paths3 min readProjects & Advanced TopicsHTML Forms4 min readHTML5 Semantics5 min readHTML URL Encoding4 min readHTML Responsive Web Design11 min readTop 10 Projects For Beginners To Practice HTML and CSS Skills8 min readTutorial ReferencesHTML Tags - A to Z List5 min readHTML Attributes Complete Reference8 min readHTML Global Attributes5 min readHTML5 Complete Reference8 min readHTML5 MathML Complete Reference3 min readHTML DOM Complete Reference15+ min readHTML DOM Audio/Video Complete Reference2 min readSVG Element Complete Reference5 min readSVG Attribute Complete Reference8 min readSVG Property Complete Reference7 min readHTML Canvas Complete Reference4 min read Like