Name

CELLPADDING — NN all IE 3 HTML 3.2

Synopsis

CELLPADDING=”length"

Optional

The amount of empty space between the border of a table cell and the content of the cell. Note that this attribute applies to space inside a cell. Without setting this attribute, most browsers render text content so that its leftmost pixels abut the left edge of the cell. If the table displays borders, adding a few pixels of breathing space between the border edge and the content makes the content more readable. Large padding may also be desirable in some design instances. This attribute is not as noticeable when the table does not display borders (in which case the CELLSPACING attribute can assist in adjusting the space between cells).

Example

<TABLE BORDER=2 CELLPADDING=3>...</TABLE>

Value

Any length value in pixels or percentage of available space.

Default

0

Object Model Reference

IE

[window.]document.all.elementID.cellPadding

Get Dynamic HTML: The Definitive Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.