cellspacing Attribute


 

Where to use the cellspacing Attribute

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

Description

The cellspacing attribute specifies the spacing between each table cell (and also between the outermost cells and the edge of the table).

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

An integer is treated as a pixel value and the spacing between cells will be this number of pixels. In theory, it is possible to specify instead a percentage value for this attribute, but a percentage of what is unclear - in fact my Firefox 2 browser seems to ignore percentage values entirely and my Opera 9 browser seems just to treat the percentage value as if it were a pixel value (i.e. "10%" is equivalent to "10"). It is therefore safer to stick to pixel values (or, better, CSS and the border-spacing and border-collapse properties).

See also the cellpadding 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) > cellspacing Attribute (XHTML 1.1)