EchoEcho.Com Homepage
Web Hosting - As Reliable As It Gets!
   Home > Tutorials > HTML > Forms


 Tutorials 
 D-Zine Articles 
 Online Tools 
 Free Resources 
 References 
 Quiz 
 Hosting 

















  HTML Forms :
TEXT AREA








Text areas are text fields that can span several lines.

Unlike most other form fields, text areas are not defined with an <input> tag.

Instead you enter a <textarea> tag where you want the text area to start and a closing </textarea> tag where you want the area to end.

Everything written between these tags will be presented in the text area box.




SETTINGS:

Below is a listing of valid settings for text areas:

HTMLEXPLANATIONEXAMPLE
textarea
rows=
cols=
name=
tabindex=

wrap=
off
virtual

physical

Text area - several lines
Rows in the field.
Columns in the field.
Name of the field.
Tab order of the field.


Turns off linebreaking
Shows linebreaking, but
sends text as entered.
Inserts linebreaks when
needed and even sends it.





The cols and rows settings are straightforward and simple. They specify how many columns and rows you want in your text area.

The name setting adds an internal name to the field so the program that handles the form can identify the fields.

The tabindex setting defines in which order the different fields should be activated when the visitor clicks the tab key.

The wrap options are the most tricky part of text areas.
If you turn wrap off the text is handled as one long sequence of text without linebreaks.
If you set it to virtual the text appears on your page as if it recognized linebreaks - but when the form is submitted the linebreaks are turned off.
If you set it to physical the text is submitted exactly as it appears on the screen - linebreaks included.




AN EXAMPLE:

Look at this HTML example:
<html>
<head>
<title>My Page</title>
</head>

<body>
<form name="myform" action="http://www.mydomain.com/myformhandler.cgi" method="POST">
<div align="center">
This is outside the area<br><br>
<textarea cols="40" rows="5" name="myname">
Now we are inside the area - which is nice.
</textarea>

<br><br>
And now we are outside the area again.
</div>
</form>
</body>
</html>





 << PREVIOUS
READ MORE >>  
















DEVELOPER TIP!
FACT:
Most professional sites limit their use of javascript to about 10 different issues.
TIP:
Our Online Tools were created to offer these things to people that can't program in javascript.





     "Better Than Books - As Easy As It Gets!"


On EchoEcho: D-Zine Articles | Tutorials | Online Tools | Free Resources | References | Quiz | HostingAbout EchoEcho