Textareas retrieve "blog" type information from the user. Paragraphs, essays, or memos can by cut and pasted into textareas and submitted. Textareas have an opening and a closing tag, any words placed between them will appear inside your text area.
A text area could take up an entire page if required.
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 it appears exactly as it does in the text box.
Off sets a textarea to ignore all wrapping and places the text into one ongoing line.
HTML Code:
<textarea>Text Area!</textarea>
Default Textarea:
HTML - Text area Cols and Rows
Adjusting the size of the appearance of the text area requires two attributes, cols and rows. Use a numeric value for each attribute and the larger the value the larger the field will appear.HTML Code:
<textarea cols="20" rows="10">Text Area!</textarea> <textarea cols="40" rows="2">Text Area!</textarea> <textarea cols="45" rows="5">Text Area!</textarea>
Bigger Text Areas:
HTML - Textarea Wrap
The wrap attribute refers to how the text reacts when it reaches the end of each row in the text field. Wrapping can be one of three settings:- soft
- hard
- off
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 it appears exactly as it does in the text box.
Off sets a textarea to ignore all wrapping and places the text into one ongoing line.
HTML Code:
<textarea cols="20" rows="5" wrap="hard">
As you can see many times word wrapping is often the desired
look for your textareas. Since it makes everything nice and
easy to read.
</textarea>
Text Area Wrapping:
HTML Code:
<textarea cols="20" rows="5" wrap="off">
As you can see many times word wrapping is often the desired
look for your textareas. Since it makes everything nice and
easy to read.
</textarea>
No Wrapping:
HTML - Textarea Readonly
Settting a yes or no value for the readonly attribute determines whether or not a viewer can manipulate the text inside the text field.HTML Code:
<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>
Read Only Textareas:
Now you may not change the text inside the text area. However, you can still highlight or Ctrl-C and copy the texts.HTML - Disabled
As the readonly attribute disables text manipulation, we can take things one step further by setting the disabled attribute. This grays out the textarea altogether and inhibits any change in the text as well as text highlighting.HTML Code:
<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>
0 comments
একটি মন্তব্য পোস্ট করুন