HTML input accept Attribute
HTML <input> tag
Definition and Usage
The accept attribute specifies the different content types the form
application will process correctly.
This attribute is only used if the type attribute of the input element is set
to "file".
This attribute is poorly supported in all major browsers. It is recommended
to use server side validation on file uploading.
Syntax
<input accept="content_type" />
|
Syntax Example
<input accept="image/gif" />
|
Attribute Values
Value |
Description |
content_type |
A comma-separated list of content types accepted by the
form processing server. Possible values:
|
Browser Support

Note: This attribute is not well supported in any of the major browsers.
Example
<form action="demo_input_example.asp">
<input type="file" accept="image/gif"
id="pic" name="pic" />
</form>
|
HTML <input> tag
 |

|
|
See why there are 20,000+ Ektron integrations worldwide.
Request an INSTANT DEMO or download a FREE TRIAL today. |
|
|
|