HTML width attribute
Example
Two table cells with predefined widths:
| Month | Savings |
|---|---|
| January | $100 |
| February | $80 |
Try it »
Browser support





All major browsers support the width property.
Definition and Usage
HTML5 does not support the width attribute. Please use CSS instead.
In HTML 4.01, the width attribute is deprecated.
The width attribute specifies the width of a table cell.
Normally, the space a cell occupies is the space it needs to display its content. The width attribute is used to set a predefined width for a cell.
Compatibility notes
In HTML 4.01, the width attribute is deprecated. Please use CSS instead.
CSS syntax:
CSS example: Setting the width of table cells
In our CSS tutorial, you can find more details about width property details.
HTML Tag