HTML <th> nowrap attribute
HTML <th> tag
Example
A table header cell with a nowrap attribute:
<table border="1">
<tr>
<th>Month</th>
<th nowrap="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 yourself!
|
Definition and Usage
The nowrap attribute specifies that the content inside a header cell should not wrap.
Browser Support
The nowrap attribute is deprecated, but still supported in all major browsers.
Compatibility Notes
The nowrap attribute of the th element was deprecated in HTML 4.01,
and is not supported in XHTML 1.0 Strict DTD.
Use CSS instead.
CSS syntax: <th style="white-space: nowrap">
CSS
Example: no word wrapping in th
In our CSS tutorial you can find more details about the
white-space property.
Syntax
Attribute Values
Value |
Description |
nowrap |
Specifies that the content inside a header cell should not
wrap |
HTML <th> tag
|