Web Design / HTML

  1. Home
  2. Computing & Technology
  3. Web Design / HTML

<input type="file" />

By Jennifer Kyrnin, About.com

<input type="file" /> Description:

The <input type="file" /> tag uploads files to the Web server through the form.

<input type="file" /> Web Browser Support:

<input type="file" /> Attributes:

<input type="file" /> Usage:

  • standard file upload field:
    <form enctype="multipart/form-data">
    <input type="file" name="uploaded_file" accept="application/msword, application/rtf" />
    </form>

<input type="file" /> Special Notes:

  • Always use the enctype of "multi-part/form-data" on the form, otherwise the files will not upload correctly.
  • Use the attribute accept to define the MiME types of the files that you want uploaded.

More <input type="file" /> Information:

Return to the <input /> Element
Return to XHTML Element (HTML Tags) Library

Explore Web Design / HTML

About.com Special Features

Web Design / HTML

  1. Home
  2. Computing & Technology
  3. Web Design / HTML

©2009 About.com, a part of The New York Times Company.

All rights reserved.