Wednesday 20 August 2014

Accepted Extension of File in HTML

Definition:-


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.


Syntax:-

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

List:- 

Attribute Values

ValueDescription
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


No comments: