THE WORLD'S LARGEST WEB DEVELOPER SITE

HTML <input type="file">

❮ HTML <input> type attribute

Example

Define a file-select field:

Select a file: <input type="file" name="myFile">
Try it Yourself »

Definition and Usage

The <input type="file"> defines a file-select field and a "Browse" button for file uploads.

To define a file-select field that allows multiple files to be selected, add the "multiple" attribute.


Browser Support

The numbers in the table specify the first browser version that fully supports the element.

Attribute
type="file" 1.0 Yes 1.0 1.0 1.0

Syntax

<input type="file">

❮ HTML <input> type attribute