<input type="file" /> Description:
The <input type="file" /> tag uploads files to the Web server through the form.
<input type="file" /> Web Browser Support:
- Netscape 2, 3, 4, 6, 7
- Mozilla 1
- Firefox 1
- Internet Explorer 2, 3, 4, 5, 6
- Opera 3, 4, 5, 6, 7, 8
- Safari 1
- WebTV / MSNTV
- AvantGo Palm OS
- AvantGo Windows CE
- HTML 3.2, 4.0
- XHTML 1.0
XHTML Forms Module XHTML Intrinsic Events Module
<input type="file" /> Attributes:
- All the attributes of the input tag, plus:
- accept (optional)
- disabled (optional)
- name (optional)
- readonly (optional)
- type="file"
- usestyle (optional)
- value (optional)
- width (optional)
<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

