Tutorials & Script Homepage
HTML/DHTML 36to42
Select Tags (Drop downs)
The Textarea Tag
Why Validate Your HTML ?
Table Tricks
Quirks Mode - Using the DOCTYPE Tag
Web Pages for Everyone
Frames: Why and Why Not
advertisment
advertisement
advertisement
Host With Us: HostingHelper.co.uk From Only $5.00p/m
Spotted an Error ? Let us Know
100's more FREE templates at FreeWebTemplates
Looking for a new Web Host ?
Free templates from TemplatesLand
Professional High-End Templates
TemplateBox.com more FREE templates
Free Flash Templates and Intros
advertisement
 
HTML/DHTML TUTORIAL NUMBER : 37
Please Click Here, and Help Keep This Site FREE to Use
 
Please click on our sponsors advert to the right if you download or use anything from this page.
Thank you for your help.
This tutorial has been created by: Webdesign.about.com

The Textarea Tag

The textarea tag creates a multiple lined text input field in your reader's browser. It allows the reader to type in nearly unlimited lines of text.

When the form is submitted, these lines are sent to the server as the value of the name of the textarea. If your reader hits enter in the field, it is sent to the server as (CR/LF). The textarea tag must always be followed by the closing </textarea> tag.

This tag has several commonly used attributes:

  • cols
  • rows
  • name (required)
  • wrap

cols
The cols attribute indicates how many columns wide the textarea should be.

rows
The rows attribute defines how many rows down the textarea should be.

Neither cols, nor rows are required attributes, but in order to keep your layout I strongly recommend that you set them. You will find that your readers will not want to type more than there is space available (even though there are scroll bars to include additional text), so this is a good way to limit the text submitted by a small amount.

wrap
There are three values for the wrap attribute,virtual,physical, andoff. Off is the default value. This defines how the text behaves within the textarea space.

wrap="off" provides no wrapping. Unless your readers hit <ENTER>, the text they type in will scroll along on one long line. The text will be sent to the server as one long line unless the reader hits the carriage return key.

This is an example of a textarea field where the wrap is turned off.

wrap="virtual" wraps the text within the space of the text box, but sends it to the server as one long line, as if no wrapping occurred.

This is an example of a textarea field where the wrap is virtual.

wrap="physical" wraps the text within the text box, and sends it to the server exactly as the reader sees it in the text box.

This is an example of a textarea field where the wrap is physical.

You can also use style tags on textarea boxes with thestyleandclassattributes. And JavaScript uses the event handlersonFocus,onBlur,onChange, andonSelect. You use these attributes as you would use them in any other HTML tag.

I hope this came in useful!
Ask in the forum if you have any suggestions or comments.

This tutorial has been created by: Webdesign.about.com
Web Hosting  |  Membership website templates  |  Reliable UK Web Hosting  |  dresses  |  Art Web Templates  |  Cheap Flight Deals  |  UK Web Hosting Company  |  Coursework Writing  |  Reseller Hosting  |  coches de ocasion  |  Cheap UK Web Hosting  |   cell phones  |  Web Design  |  Low Cost Domain Names  |  Website templates  |  master a distancia  |  Austin Web Design  |  Flash Templates  |  Factory  |   cell phones  |  Canadian Web Hosting  |  Flash Intros  |  Web Templates  |  cartuchos  |  Corporate Logo Design Service  |  Website Templates  |  Bespoke Software Development  |  Domain Name Registration  |  Free Website Templates  |   Dedicated Server  |  UK Web Hosting  |  Dating Software - aeDating 4.1  |  Website Templates  |  Power Saver  |  taobao agent  |  Flash templates  |  cctv cameras  |  Lolita Dresse  |  china wholesale  |  Canadian Web Hosting  |   Cheap Web Hosting Deal  |  Linux Hosting  |  Web Design uk  |  Web Hosting  |  Business web directory  |  Electronics  |  Free domain names  |  Best UK web Hosting  |  Shower Enclosures UK  |  

 
advertisment
advertisment
advertisment
  Top-end templates
  Flash Templates
  Web Hosting UK
  Made-in-China.com
  Web Design Tips
  Web Hosting Reviews
  Web hosting reviews
  Website Design
  Top web hosting
  Stock Photography
  Bildagentur
  Reseller Hosting
  Company Logos
  Website Templates
  Website Templates
  Web Hosting UK
  templatebox.com
  freewebtemplates.com
  templatesland.com
  topfreegraphics.com
  freegraphicland.com
  free-templates-layouts
  Logo Design Software
  Layouts4Free
  Webmaster Resoucres
  Web Templates Factory
  Free Web Templates
  Free Templates Catalog
  Web Templates
  Reseller Web Hosting
  Stock Photography
  Animations-galore.com
  4print.com.au
  Host Review
  Web Hosting Host Color
  Dedicated Servers
  FlashTemplateDesign
  ZeroDollarTemplates
  Killersites.com
  how-to-build-websites
  Build a free website
  web Hosting
  Business Logo Design
  Templates Favpage
  webmastermind.de
  flasheasy.com
  More Featured Sites