Easy Tutorial
❮ Att Label For Att Button Formmethod ❯

HTML <form> accept Attribute

HTML <form> Tag

Example

Specifies that the server only accepts gif and jpeg files in file uploads:


Browser Support

Note: Almost all major browsers do not support the accept attribute.


Definition and Usage

The accept attribute specifies the types of files that the server accepts through file uploads.

Tip: Avoid using this attribute as a validation tool. File uploads should be validated on the server side.


Syntax

Attribute Values

Value Description
MIME_type One or more allowed MIME types to be submitted/uploaded. Use commas to separate multiple MIME types. Refer to the IANA MIME types for a complete list of standard MIME types.

❮ Att Label For Att Button Formmethod ❯