Name

table — <table> . . . </table>

Indicates a table. The minimum elements for defining a table are table for establishing the table itself, tr for declaring a table row, and td for creating table cells within the row. The end tag for the table element is required, and its omission may cause the table not to render in some browsers.

Attributes

Core, Internationalization, Events

align="left|right|center"

Deprecated. Aligns the table within the text flow (same as align in the img element). The default alignment is left . The center value is not universally supported.

bgcolor="#rrggbb" or "color name"

Deprecated. Specifies a background color for the entire table. The color is specified in hexadecimal RGB values or by color name. Stylesheets are the proper way for specifying colors.

border="number"

Specifies the width (in pixels) of the border around the table and its cells. Setting its value to 0 (zero) turns the borders off completely. The default value is 1. Adding the word border without a value results in a 1-pixel border, although this is not valid in XHTML.

cellpadding="number"

Sets the amount of space, in number of pixels, between the cell border and its contents. The default value is 1.

cellspacing="number"

Sets the amount of space (in number of pixels) between table cells. The default value is 2.

frame="void|above|below|hsides|lhs|rhs|vsides|box|border"

Tells the browser where to draw borders around the table. The values are as follows:

Value

Description

void

The frame does not appear (default). ...

Get HTML and XHTML Pocket Reference, 3rd Edition 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.