Wednesday, 20 August 2014

Accepted Extension of File in HTML


The extensions is accepted by the types of files while uploading in form tag.

Note: The accept tag can only be used with file extension.


<input accept="file_extension|audio/*|video/*|image/*|media_type">


Attribute Values

file_extensionA file extension starting with the STOP character, e.g: .gif, .jpg, .png, .doc
audio/*All sound files are accepted
video/*All video files are accepted
image/*All image files are accepted
media_typeA valid media type, with no parameters.
 Look at IANA Media Types for a complete list of standard media types