English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The nowrap attribute is a boolean attribute. The nowrap attribute specifies that the content in the header cells does not wrap.
Header cells with nowrap attribute:
<table style="width:100%" border="1"> <tr> <th>Year</th> <th nowrap>Save money to buy a house</th> </tr> <tr> <td>2018</td> <td>$15320.00</td> </tr> <tr> <td>2019</td> <td>$18320.00</td> </tr> </table>Test to see ‹/›
IEFirefoxOperaChromeSafari
All major browsers support the nowrap attribute.
HTML5 The nowrap attribute of <th> is not supported. Please use CSS instead.
In HTML 4.01 In HTML, the nowrap attribute of <th> is deprecated.
The nowrap attribute is a boolean attribute.
The nowrap attribute specifies that the content of the table header cell does not wrap.
In HTML 4.01 In this case, the nowrap attribute of <th> is deprecated. Please use CSS instead.
CSS Syntax: <th style="white-space: nowrap">
CSS Example: Table header cell without line break
You can find more aboutwhite-space attribute . Details.
In XHTML, attribute shorthand is prohibited, the nowrap attribute must be defined as <th nowrap="nowrap">.
<th nowrap>HTML <th> tag