HTML Old School

Textarea

When you want to insert great amount of text use textarea.

advert: <textarea name="ad" cols="50" rows="5"></textarea>

 

 Example: 09textarea.html

 

 

 Textarea attributes

 1. name="string"

Define variable name. Default value of that variable is between textarea tags:

<textarea name="var2" cols="50" rows="5">default value of var2</textarea>

 Example with default value: 10textarea_defaultvalue.html

 

 2. cols=int"   ,   rows="int"

Defines how many columns and rows will textarea have.

 

3. wrap=" soft | hard | off "

Determine behaviour of text when the end of textarea field is reached.

off - text is in one line unless ENTER is pressed

Example: 11textarea_wrap.html

 

 

 

Text alignment in textarea

A) text beside field style="vertical-align: top | middle | bottom;"

advert: <textarea name="ad" cols="20" rows="5" style="vertical-align:middle;"></textarea>

Example without label: 12textarea_text_beside_nolabel.html

Example with label: 12textarea_text_beside_label.html

 

B) text inside field style="text-align: left | center | right;

advert: <textarea name="ad" cols="20" rows="5" style="text-align:center;"></textarea>

Example: 13textarea_text_inside.html