Advertisement
Home Open Editor ❯

HTML <textarea> wrap Attribute

Example

<form action="action.php">
  <textarea wrap="hard" name="textareaText"></textarea>

  <input type="submit" value="Submit">
</form>

Try this code ❯

Meaning

The wrap attribute specifies how the control wraps text.

Note: If this attribute is not specified, soft is its default value.


Standard Syntax

<textarea wrap="hard|soft">...</textarea>


Advertisement

Attribute Values

Value Description
off(not recommended) It forces the <textarea> element not to wrap text, so the viewer must manually enter line breaks.
hard Specifies the word wrap and includes line breaks in text submitted to the server.
soft Specifies the word wrap but removes line breaks from text submitted to the server.
Home Open Editor ❯
Advertisement