Name

td — HTML 4.01 | HTML5

Synopsis

<td> . . . </td>

Defines a table data cell. A table cell may contain any content, including another table.

Start/End Tags

HTML: Required/Optional; XHTML: Required/Required

Attributes

Core, Internationalization, Events, HTML5 Global Attributes

abbr="text"

Not in HTML5. Provides an abbreviated form of the cell’s content.

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

Not in HTML5. Specifies the horizontal alignment of text in a cell or cells. The default value is left.

axis="text"

Not in HTML5. 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. Style sheets should be used to position images in the background of table cells.

bgcolor="#rrggbb" or "color name"

Deprecated. Not in HTML5. 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"

Not in HTML5. 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"

Not in HTML5. Specifies the offset distance to the first alignment character on each line. If a line doesn’t use an alignment character, it should be horizontally shifted to end at the alignment position. This attribute is generally not supported ...

Get HTML & XHTML Pocket Reference, 4th 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.