O'Reilly logo

HTML and XHTML Pocket Reference, 3rd Edition by Jennifer Robbins

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

td — <td> . . . </td>

Defines a table data cell. The end tag is not required in HTML markup but may prevent unpredictable table display, particularly if the cell contains images. The end tag is required in XHTML for the document to be valid. A table cell can contain any content, including another table.

Attributes

Core, Internationalization, Events

abbr="text"

Provides an abbreviated form of the cell’s content.

align="left|right|center|justify|char"

Specifies the horizontal alignment of text in a cell or cells. The default value is left . The align attribute as it applies to table cell content has not been deprecated and appears in the Tables Module of the XHTML 1.1 Recommendation.

axis="text"

Places a cell into a conceptual category, which could then be used to organize or search the table in different ways.

background="URL"

Nonstandard. Specifies a graphic image to be used as a tile within the cell. Stylesheets should be used to position images in the background of table cells.

bgcolor="#rrggbb" or "color name"

Deprecated. Specifies a color to be used in the table cell. A cell’s background color overrides colors specified at the row or table levels.

char="character"

Specifies a character along which the cell contents will be aligned when align is set to char . The default character is a decimal point (language-appropriate). This attribute is generally not supported by current browsers.

charoff="length"

Specifies the offset distance to the first alignment character on each line. If a line ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required