<html>
<body>
<form action="demo_form.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>
<p><b>Note:</b> The accept attribute is not supported in any of the major browsers.</p>
</body>
</html>