Easy Tutorial
❮ Tag Details Att Img Vspace ❯

HTML <th> height Attribute

HTML <th> Tag

Example

Two header cells with predefined heights:


Browser Support

All major browsers support the height attribute.


Definition and Usage

In HTML 4.01, the height attribute for <th> is deprecated.

The height attribute specifies the height of the header cell.

Usually, if the height attribute is not set, the header cell occupies the space it needs to display its content. The height attribute is used to set a predefined height for the header cell.


Compatibility Notes

In HTML 4.01, the height attribute for <th> is deprecated. Use CSS instead.

CSS syntax: <th style="height:100px">

CSS Example: Setting the Height of a Header Cell

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


Syntax

Attribute Values

Value Description
pixels Sets the height in pixels (e.g., height="50").
% Sets the height as a percentage of the containing element (e.g., height="50%").

❮ Tag Details Att Img Vspace ❯