Attribut d'habillage HTML <textarea >

❮ Balise HTML <textarea>

Exemple

Le texte dans une zone de texte avec wrap="hard" contiendra des retours à la ligne (le cas échéant) lorsqu'il sera soumis dans un formulaire :

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

Définition et utilisation

L' wrapattribut spécifie comment le texte d'une zone de texte doit être enveloppé lorsqu'il est soumis dans un formulaire.


Prise en charge du navigateur

Attribute
wrap Yes Yes Yes Yes Yes

Syntaxe

<textarea wrap="soft|hard">

Valeurs d'attribut

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

❮ Balise HTML <textarea>