• Have Any Question?
  • contact@eitworld.com

HTML File Upload Box





    • File Upload Box allows user to select a file and send it to server to upload that file on your web site.
    • File Upload Box is also known as File Select Box.
    • This is also created using the <input> element but type attribute is set to file.

Syntax:

<input type=”file” name=”fileupload” accept=”any acceptable file type” />

 

  • Here is an example of file upload box control which will let you to choose a image file from your pc:

Example

<!DOCTYPE html>
<html>
<body>
<form >
<input type=”file” name=”fileupload” accept=”image/*” />
</form>
</body>
</html>

To see live output : Visit Try Yourself Editor

Output

Attributes

 

Here is the list of Attributes for file upload box control:

Attribute Description
name (Optional) It is important as the control will be identified in the other file or server by the value of this attribute.
accept (Optional) This attribute specifies the types of files that the server accepts.

 



Real Time Web Analytics