HTML <form> accept Attribute
Example Specify that the server accepts only gif and jpeg files in the file upload: <form action=”/action_page.php” accept=”image/gif,image/jpeg”> First name: <input type=”text” name=”fname”><br> Last name: <input type=”text” name=”lname”><br> Your image: <input type=”file” name=”pic” id=”pic”><br> <input type=”submit” value=”Submit”> </form> Try it Yourself » Definition and Usage The <form> accept attribute is not supported in HTML5. The accept attribute specifies the types of files that the server accepts (that can be […]
