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

More from About.com

  1. Home
  2. Computing & Technology
  3. Web Design / HTML
  4. HTML and XHTML
  5. XHTML
  6. HTML Tags
  7. The input type="file" Element - file upload forms - XHTML 1.0 HTML 4.0

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

All rights reserved.