HTML th nowrap attribute

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>


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">

Syntax

<th nowrap="value">

Attribute Values

Value Description
nowrap Specifies that the content inside a header cell should not wrap
Share this article :
 
Copyright © 2012. Best Online Tutorials | Source codes | Programming Languages - All Rights Reserved