HTML-<textarea> -Wrap- Attribut
Beispiel
Der Text in einem Textbereich mit wrap="hard" enthält Zeilenumbrüche (falls vorhanden), wenn er in einem Formular gesendet wird:
<textarea rows="2" cols="20" wrap="hard">
At W3Schools you will find free Web-building tutorials.
</textarea>
Definition und Verwendung
Das wrap
Attribut gibt an, wie der Text in einem Textbereich umbrochen werden soll, wenn er in ein Formular gesendet wird.
Browser-Unterstützung
Attribute | |||||
---|---|---|---|---|---|
wrap | Yes | Yes | Yes | Yes | Yes |
Syntax
<textarea wrap="soft|hard">
Attributwerte
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>-Tag