Name
ACCEPT — NN n/a IE n/a HTML 4
Synopsis
ACCEPT=”MIMETypeList"Optional
Specifies one or more MIME types for allowable files to be uploaded
to the server when the form is submitted. The predicted
implementation of this attribute would filter the file types listed
in file dialogs used to select files for uploading. In a way, this
attribute provides client-side validation of a file type so that
files not conforming to the permitted MIME type is not even sent to
the server. The HTML 4.0 specification also has this attribute
available in the FORM element. It is unclear
whether the implementations in browsers will recognize this attribute
in both places.
Input Types
file
Example
<INPUT TYPE="file" ACCEPT="text/html, image/gif" ...>
Value
Case-insensitive MIME type (content type) value. For multiple items, a comma-delimited list is allowed.
Default
None.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access