Skip to content
Related Articles

Related Articles

Improve Article
HTML | <input type=”file”>
  • Last Updated : 29 May, 2019

The HTML <input type=”file”> is used to specify the file select field and add a button to choose a file for upload to the form.

Syntax:

<input type="file"> 

Example:




<!DOCTYPE html> 
<html
  
<head
    <title
        HTML input type file
    </title
      
    <style
        h1 { 
            color: green; 
        
        h3 { 
            font-family: Impact; 
        
        body { 
            text-align: center; 
        
    </style
</head
  
<body
    <h1
        GeeksforGeeks 
    </h1
      
    <h3
        HTML <Input Type = "File"
    </h3
  
    <input type="file" id="myFile"
      
    <p id="submit_text"></p>
</body
  
</html>                    

Output:

Supported Browsers: The browsers supported by <input type=”file”> are listed below:

  • Google Chrome 1.0
  • Internet Explorer
  • Firefox 1.0
  • Safari 1.0
  • Opera 1.0
My Personal Notes arrow_drop_up
Recommended Articles
Page :