Easy Tutorial
❮ Att Img Width Tag Footer ❯

HTML <td> width Attribute

HTML <td> Tag

Example

Two table cells with predefined widths:


Browser Support

All major browsers support the width attribute.


Definition and Usage

In HTML 4.01, the width attribute of <td> is deprecated.

The width attribute specifies the width of a table cell.

Usually, a cell takes up the space it needs to display its content. The width attribute is used to set a predefined width for the cell.


Compatibility Notes

In HTML 4.01, the width attribute of <td> is deprecated. Use CSS instead.

CSS syntax: <td style="width:100px">

CSS Example: Setting the Width of a Table Cell

In our CSS tutorial, you can find more details about the width property.


Syntax

Attribute Values

Value Description
pixels Sets the width in pixels (e.g., width="50").
percent Sets the width as a percentage of the containing element (e.g., width="50%").
❮ Att Img Width Tag Footer ❯