English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML Reference Manual

HTML Tag大全

HTML: <th> nowrap attribute

The nowrap attribute is a boolean attribute. The nowrap attribute specifies that the content of the header cells does not wrap.

 HTML <th> balise

Online example

Header cells with nowrap attribute:

<table style="width:100%" border="1">
  <tr>
    <th>Year</th>
    <th nowrap>Buy a house with savings</th>
  </tr>
  <tr>
    <td>2018</td>
    <td>$15320.00</td>
  </tr>
  <tr>
    <td>2019</td>
    <td>$18320.00</td>
  </tr>
</table>
Test to see‹/›

Compatibilité du navigateur

IEFirefoxOperaChromeSafari

Tous les navigateurs populaires prennent en charge l'attribut nowrap.

Définition et utilisation

HTML5 L'attribut nowrap de <th> n'est pas pris en charge. Utilisez CSS à la place.

Dans HTML 4.01 Dans HTML, l'attribut nowrap du <th> est obsolète.

L'attribut nowrap est un attribut booléen.

L'attribut nowrap spécifie que le contenu de la cellule d'en-tête ne doit pas sauter de ligne.

Commentaires de compatibilité

Dans HTML 4.01 dans laquelle, l'attribut nowrap du <th> est obsolète. Utilisez CSS à la place.

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

CSS Exemple : les cellules d'en-tête sans saut de ligne

Vous pouvez trouver plus d'informations surwhite-Attribut space détails.

Les différences entre HTML et XHTML

Dans XHTML, l'abréviation des attributs est interdite, l'attribut nowrap doit être défini comme <th nowrap="nowrap">.

Grammaire

<th nowrap>
 HTML <th> balise