<!DOCTYPE html> <html> <body> <h1>The input accept attribute</h1> <form action="/action_page.php"> <label for="img">Select image:</label> <input type="file" id="img" name="img" accept="media_type"> <input type="submit"> </form> <p><strong>Note:</strong> Because of security issues, this example will not allow you to upload files.</p> </body> </html>