HTML <textarea>ラップ属性

❮HTML<textarea>タグ

wrap = "hard"のあるテキスト領域のテキストには、フォームで送信されたときに改行(存在する場合)が含まれます。

<textarea rows="2" cols="20" wrap="hard">
At W3Schools you will find free Web-building tutorials.
</textarea>

定義と使用法

このwrap属性は、フォームで送信するときにテキスト領域のテキストをどのように折り返すかを指定します。


ブラウザのサポート

Attribute
wrap Yes Yes Yes Yes Yes

構文

<textarea wrap="soft|hard">

属性値

Value Description
soft The text in the textarea is not wrapped when submitted in a form. This is default
hard The text in the textarea is wrapped (contains newlines) when submitted in a form. When "hard" is used, the cols attribute must be specified

❮HTML<textarea>タグ