Horje

How to add HTML <textarea> wrap Attribute with label Tag

The text in a text area with wrap="hard" will contain newlines (if any) when submitted in a form.

Definition and Usage

The wrap attribute specifies how the text in a text area is to be wrapped when submitted in a form.


Browser Support

Syntax

<textarea wrap="soft|hard">

Attribute Values

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
index.html
Example: HTML
<!DOCTYPE html>
<html>
<body>

<h1>The textarea wrap attribute</h1>

<form action="/action_page.php">
<label for="text">Type</label><br>
<textarea rows="2" cols="20" name="usrtxt" wrap="hard">
At Horje you will find free Web-building tutorials.
</textarea>
<input type="submit">
</form>

</body>
</html>

Output should be:

How to add HTML <textarea> wrap Attribute with label Tag




Type:
html
Category:
Web Tutorial
Sub Category:
HTML Tag
Uploaded by:
Admin