VOOZH about

URL: https://www.geeksforgeeks.org/html/html-table-cellpadding-attribute/

⇱ HTML <table> cellpadding Attribute - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

HTML <table> cellpadding Attribute

Last Updated : 11 Jul, 2025

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.

Output:

👁 Image

Example 2: In this example, we will see the implementation of table cell padding with another example.

Output:

👁 Screenshot-2023-12-26-161819

Supported Browsers:

  • Google Chrome 1
  • Edge 12
  • Firefox 1
  • Safari 3
  • Opera 12.1
Comment
Article Tags: