集册 HTML 标签教程 HTML <th> nowrap 属性

HTML <th> nowrap 属性

Xebcnor     最近更新时间:2019-10-11 03:41:59

370

HTML <th> nowrap 属性

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

实例

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

运行实例

浏览器支持

Internet ExplorerFirefoxOperaGoogle ChromeSafari

所有主流浏览器都支持 nowrap 属性。

定义和用法

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

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

nowrap 属性是一个布尔属性。

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

兼容性注释

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

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

CSS 实例:表头单元格中不换行

展开阅读全文