Latest web development tutorials

HTML th nowrap attribute

HTML th tag Reference Manual HTML <th> tag

Examples

Header cell with a nowrap attribute:

<table border="1">
<tr>
<th>Month</th>
<th nowrap>My Savings for a new car</th>
</tr>
<tr>
<td>January</td>
<td>$100</td>
</tr>
<tr>
<td>February</td>
<td>$80</td>
</tr>
</table>

try it"

Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the nowrap attribute.


Definition and Usage

HTML5 does not support the <th> nowrap attribute. Use CSS instead.

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

nowrap attribute is a Boolean attribute.

nowrap attribute specifies the header cell content does not wrap.


Compatibility Notes

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

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

CSS Example: table header cell does not wrap

In our CSS tutorial you can find more information about the white-space attribute details.


Differences between HTML and XHTML

In XHTML, prohibit attribute minimization, nowrap attribute must be defined as <th nowrap = "nowrap">.


grammar

<th nowrap>


HTML th tag Reference Manual HTML <th> tag