This page is Not Ready

Notice: The WebPlatform project has been discontinued when the Stewards partnership agreement ended in September 2015. This site has been frozen, and the assets we have created will remain.



Specifies the space, in pixels, between the cell wall and the cell content. Not supported in HTML5. Use CSS.

Applies to ?
The *table* element cellpadding attribute is not supported in HTML5. Use CSS instead.

The cellpadding attribute specifies the space between each cell stroke. Value has to be a number, and is interpreted as a size in pixels.

Note: Do not confuse this with the cellspacing attribute, which specifies the space between cells.

Tip: It may be better to NOT specify a cellpadding, and use CSS to apply padding instead.


Here is a table where we use the cellpadding and border table attributes.

<table border="1" cellpadding="10">

Related specifications

Document Object Model (DOM) Level 1, Section 2.5.5
HTML 4.01 Specification, Section 11.3.3

See also

Related pages