cellpadding Attribute


 

Where to use the cellpadding Attribute

  • As Type Length:
    cellpadding is declared on the element: table

Description

The cellpadding attribute specifies the padding within each table cell, between the cell's border and its contents.

The cellpadding attribute is not present in the *W3C XHTML 1.1 Basic Tables Module.

An integer is treated as a pixel value and each of the top, bottom, left and right paddings should be this number of pixels. In theory, it is possible to specify instead a percentage value for this attribute, but since both of the browsers I tested merely treated this percentage as if it were a pixel value - i.e. "10%" is equivalent to "10", it seems safer to stick to pixel values (or, better, CSS and the padding property).

See also the cellspacing attribute.


Page Footer & Copyright

Copyright © Sally Maughan 2005-2009 (Page last updated on 16 May 2009)

*Valid XHTML 1.1 - hosted by *Openstrike

Content based on the W3C Working Draft: *XHTML 1.1 and Recommendation: *XHTML Modularisation 1.1.

W3C, XHTML, XML, HTML, CSS and MathML are *Trademarks of the W3C (*MIT, *ERCIM, *Keio) with which the site's author has no connection.


Up, Next & Previous Links

Your Location

Home > XHTML 1.1 Home > XHTML 1.1 Indexes > Attribute Index (XHTML 1.1) > cellpadding Attribute (XHTML 1.1)