An HTML textarea is an oversized Text Field capable of capturing "blurb" type information from a user. If you've ever posted on a forum or left feedback on your favorite blog, you probably do so using an HTML textarea.
<textarea name="myTextArea"cols="20" rows="10">Please limit your response to 100 characters.</textarea><br /> <textarea name="myTextArea" cols="40" rows="2">Please limit your response to 200 characters.</textarea><br /> <textarea name="myTextArea" cols="45" rows="5">Please limit your response to 500 characters.</textarea><br />
The wrap attribute refers to how the user input reacts when it reaches the end of each row in the text field. Wrapping can be defined using one of three values:
soft
hard
off
"Soft" forces the words to wrap once inside the textarea but once the form is submitted, the words will no longer appear as such, and line breaks and spacing are not maintained.
"Hard" wraps the words inside the text box and places line breaks at the end of each line so that when the form is submitted the text will transfer as it appears in the field, including line breaks and spacing.
"Off" sets a textarea to ignore all wrapping and places the text into one ongoing line.
<textarea cols="20" rows="5" wrap="hard"> As you can see many times word wrapping is often the desired look for you
Setting a "yes" or "no" value for the readonly attribute determines whether or not a viewer has permission to manipulate the text inside the text field.
<textarea cols="20" rows="5" wrap="hard" readonly="yes">
As you can see many times word wrapping is often the desired look for your text areas. Since it makes everything nice and easy to read. </textarea>
Disabling the textarea altogether prevents the surfer from highlighting, copying, or modifying the field in any way. To accomplish this, set the disabled property to "yes".
<textarea cols="20" rows="5" wrap="hard" disabled="yes">
As you can see many times word wrapping is often the desired look for your text areas. Since it makes everything nice and easy to read.
</textarea>