Find out how the text in a text area should be wrapped when submitting a form:
The result of x will be:
The wrap property sets or returns the value of the wrap attribute of a text area.
The wrap attribute specifies how the text in a text area is to be wrapped when submitted in a form.
The wrap property is supported in all major browsers.
Return the wrap property:
Set the wrap property:
Value | Description |
---|---|
soft | The text in the text area is not wrapped when submitted in a form. This is default |
hard | The text in the text area is wrapped (contains newlines) when submitted in a form. When "hard" is used, the cols attribute must be specified |
Return Value: | A String, representing how the text area wraps text when submitted in a form |
---|
HTML reference: HTML <textarea> wrap attribute