Atributo de envoltura HTML <textarea>
❮ Etiqueta HTML <área de texto>
Ejemplo
El texto en un área de texto con wrap="hard" contendrá líneas nuevas (si las hay) cuando se envíe en un formulario:
<textarea rows="2" cols="20" wrap="hard">
At W3Schools you will find free Web-building tutorials.
</textarea>
Definición y uso
El wrap
atributo especifica cómo se debe envolver el texto en un área de texto cuando se envía en un formulario.
Compatibilidad con navegador
Attribute | |||||
---|---|---|---|---|---|
wrap | Yes | Yes | Yes | Yes | Yes |
Sintaxis
<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 |
❮ Etiqueta HTML <área de texto>