Name

ACCEPT — NN n/a IE n/a HTML 4

Synopsis

ACCEPT=”MIMETypeList"

Optional

Intended for use with INPUT elements of type file, the ACCEPT attribute lets you specify 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 are not even sent to the server.

Example

<FORM ACCEPT="text/html, image/gif" ...>...</FORM>

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.