Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML table width attribute

HTML

HTML table Tag Reference HTML

width property
tag

Example

An HTML table with a width of 400 pixels:

Month Savings
January $100
February $80

Try it »


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the width property.


Definition and Usage

HTML5 does not support

The width attribute specifies the width of the table.

If the width attribute is not set, the table takes up the space needed to display the table data.

**Tip:** From a practical standpoint, it is best not to specify the width, but to use CSS to apply width (width).


Syntax

The width attribute. Use CSS instead.
HTML

tag