Skip to content
Related Articles

Related Articles

Improve Article

HTML | <form> accept Attribute

  • Last Updated : 16 Apr, 2020

The <form> accept attribute in HTML is used to specifies the type of file that the server accepts. This attribute can be used with <form type=”file”> element only. This attribute is not used for validation tool because file uploads should be validated on the Server.


<form accept = "file_type";>

Attribute Values:

  • file_type: It can hold one or more file types that can be submitted/uploaded to the server. More than one file can be added and separated by a comma.


<!DOCTYPE html> 
        HTML form accept attribute 
        body { 
            text-align: center; 
        h1 { 
            color: green; 
        HTML Form accept attribute 
    <form action=" "accept="image/*"
        <input type="file"
        <input type="submit"


Supported Browsers: This attribute is not supported by any browsers.

Attention reader! Don’t stop learning now. Get hold of all the important Comcompetitivepetitve Programming concepts with the Web Design for Beginners | HTML  course.

My Personal Notes arrow_drop_up
Recommended Articles
Page :