HTML <th> nowrapAtributo

HTML th 标签参考手册Etiqueta HTML <th>

Ejemplo

Celda de encabezado con el atributo nowrap:

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

Pruébalo »

Soporte del navegador

Internet ExplorerFirefoxOperaGoogle ChromeSafari

Todos los navegadores principales admiten el atributo nowrap.


Definición y uso

HTML5 no admite el atributo nowrap de <th>. Utilice CSS en su lugar.

En HTML 4.01, el atributo nowrap de <th>está obsoleto.。

El atributo nowrap es un atributo booleano.

El atributo nowrap especifica que el contenido de la celda de encabezado no se ajusta (no hace salto de línea).


Notas de compatibilidad

En HTML 4.01, el atributo nowrap de <th> está obsoleto. Utilice CSS en su lugar.

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

En nuestro tutorial de CSS, puede encontrar más información sobrela propiedad white-spaceen detalle.


Diferencias entre HTML y XHTML

En XHTML, la minimización de atributos está prohibida; el atributo nowrap debe definirse como <th nowrap="nowrap">.


Sintaxis

<th nowrap>


HTML th 标签参考手册Etiqueta HTML <th> Otras extensiones