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

<input type="file" />

By , About.com Guide

<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

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

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

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

All rights reserved.