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.

Get Dynamic HTML: The Definitive Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.