跳到主要内容

nowrap


HTML <td> nowrap 属性

带有 nowrap 属性的表格单元格:

<table border="1">
<tr>
<th>Poem</th>
<th>Poem</th>
</tr>
<tr>
<td nowrap>Never increase, beyond what is necessary, the number of entities required to explain anything</td>
<td>Never increase, beyond what is necessary, the number of entities required to explain anything</td>
</tr>
</table>

定义和用法

注意

HTML5 不支持 <td> nowrap 属性。请使用 CSS 代替。

在 HTML 4.01 中,<td> 的 nowrap 属性已废弃。

nowrap 属性是一个布尔属性。

nowrap 属性规定表格单元格中的内容不换行。


兼容性注释

在 HTML 4.01 中,<td> 的 nowrap 属性已废弃。请使用 CSS 代替。

CSS 语法:<td style="white-space: nowrap">

CSS 实例:设置表格单元格的高度

HTML 与 XHTML 之间的差异

在 XHTML 中,禁止属性最小化,nowrap 属性必须定义为 <td nowrap="nowrap">


语法

<td nowrap>

浏览器兼容性

Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
noWrap
Deprecated