In this section, we will learn what the <input type = “file”> is and how to use it.
What is input type file in HTML?
In a webpage, sometimes we need files from users. For example, you might have an online video convertor website where people can upload their video files and get different format of those videos in return.
Here, the uploading part can be done via the <input type = “file” > element.
Using this element, browsers render a browser button where people can click to get their files in which they want to upload.
Note: use the `multiple` attribute if you want people to be able to upload multiple files.
HTML input type file Syntax:
<input type = “file” >
Example: using <input type=”file”> in HTML
See the Pen using <input type="file"> in HTML by Omid Dehghan (@odehghan) on CodePen.