Atributo HTML <textarea> wrap

❮ Tag HTML <textarea>

Exemplo

O texto em uma área de texto com wrap="hard" conterá novas linhas (se houver) quando enviado em um formulário:

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

Definição e uso

O wrapatributo especifica como o texto em uma área de texto deve ser encapsulado quando enviado em um formulário.


Suporte ao navegador

Attribute
wrap Yes Yes Yes Yes Yes

Sintaxe

<textarea wrap="soft|hard">

Valores de atributo

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

❮ Tag HTML <textarea>