Helping ordinary people create extraordinary websites!
GET OUR NEWSLETTER
Your Email:
 

HTML Form Tutorial, Part I

By Will Bontrager
2004-07-06


Specifying the Encoding Method for the Information Being Sent

The final <form> tag attribute we'll cover in this tutorial specifies how the information will be encoded before sending it to wherever it's going. That's the "enctype" attribute.

The browser automatically encodes the information depending on the enctype attribute. Encoding transforms special non-alphanumeric characters that could otherwise wreak havoc during transmission or upon receipt into a series of characters that the receiving program or function can recognize. Encoding also inserts separators between the information chunks.

Often you don't have to concern yourself with the enctype. If you do not specify one, the default is assumed.

The default enctype attribute is:

enctype="application/x-www-form-urlencoded"

If your form includes file uploads, you will need

enctype="multipart/form-data"

And, if you will be using a mailto: link in the action attribute, your email body text will be less jumbled if you use

enctype="text/plain"


Tutorial Pages:
» HTML Form Tutorial, Part I
» How Information Is Sent
» Specifying the Encoding Method for the Information Being Sent
» Form Related Tags
» The <input> Tag
» Part II


Copyright 2004 Bontrager Connection, LLC


 | Bookmark
Related Tutorials:
» Enrich Your Web Applications
» Microsoft Complicates HTML Emails With Outlook 2007
» Testing Your Forms for Hijacking Vulnerability
» Control Your Domain Registration Data
» HTML Forms POST, GET
» HTML Tables

Advertise with Us!


Tutorials Scripts Web Hosting Developer Manuals
Resources