Easy Tutorial
❮ Att A Href Att Frame Scrolling ❯

HTML <th> nowrap Attribute

HTML <th> Tag

Example

A table header cell with the nowrap attribute:


Browser Support

All major browsers support the nowrap attribute.


Definition and Usage

In HTML 4.01, the nowrap attribute of <th> is deprecated.

The nowrap attribute is a boolean attribute.

The nowrap attribute specifies that the content inside a table header cell should not wrap.


Compatibility Notes

In HTML 4.01, the nowrap attribute of <th> is deprecated. Use CSS instead.

CSS syntax: <th style="white-space: nowrap">

CSS Example: No Wrap in Table Header Cell

In our CSS tutorial, you can find more details about the white-space property.


Differences Between HTML and XHTML

In XHTML, attribute minimization is forbidden, and the nowrap attribute must be defined as <th nowrap="nowrap">.


Syntax


❮ Att A Href Att Frame Scrolling ❯