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

HTML th width Attribute

HTML width attribute

HTML th Tag Reference HTML Tag

Example

A header cell with a predefined width:

 

   

   

 

 

   

   

 

 

   

   

 

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. Please use CSS instead.

In HTML 4.01, the width attribute is deprecated.

The width attribute specifies the width of a header 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: Set the width of a header cell

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


Syntax

HTML tag