Easy way of doing it would be:
<input type="file" accept=".gif,.jpg,.jpeg,.png,.doc,.docx">
Works with all browsers, except IE9. I haven’t tested it in IE10+.
More Related Contents:
- Applying an ellipsis to multiline text [duplicate]
- How to use the “required” attribute with a “radio” input field
- Freeze the top row for an html table only (Fixed Table Header Scrolling)
- CSS – How to Style a Selected Radio Buttons Label?
- Favicon not showing up in Google Chrome [duplicate]
- Apply CSS styles to an element depending on its child elements [duplicate]
- Do we still need forward slashes when closing void elements in HTML5?
- CSS background image alt attribute
- 3 column layout HTML/CSS
- How do I remove the blue styling of telephone numbers on iPhone/iOS?
- Swift: Display HTML data in a label or textView [duplicate]
- HTML5 / CSS3 Circle with Partial Border
- Why display grid with 100% in grid-template-columns goes out of body?
- Merge two HTML table cells
- Bootstrap right Column on top on mobile view
- Play infinitely looping video on-load in HTML5
- How to display a range input slider vertically
- how to overwrite css style
- HTML5 Canvas getImageData and Same Origin Policy
- Why should one add ID to their HTML tags?
- Force an image to fit and keep aspect ratio
- How can I horizontally center an element?
- What is the purpose of .row in Bootstrap? [duplicate]
- chrome could play html5 mp4 video but html5test said chrome did not support mp4 video codec
- VueJS/browser caching production builds
- Complete list of reasons why a css file might not be working
- What is HTML’s tag default display type?
- How to successfully embed images in HTML for display in webmail clients?
- How to set a microdata image property, without letting the browser download the image?
- What is the purpose for HTML’s tbody?