HTML <th> nowrap属性
例
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>
<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>
試してみる »
ブラウザサポート
![]()
![]()
![]()
![]()
![]()
すべての主要ブラウザは 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 チュートリアルでは、詳細をご覧いただけます。white-space 属性の詳細。
HTMLとXHTMLの違い
XHTML では属性の最小化が禁止されており、nowrap 属性は <th nowrap="nowrap"> と定義する必要があります。
構文
<th nowrap>
HTML <th> タグ その他の拡張