HTML enctype Attribute
Definition and Usage
The enctype attribute specifies how the form-data should be encoded when submitting it to the server.
Note: The enctype attribute can be used only if method="post".
Applies to
The enctype attribute can be used on the following element:
| Element | Attribute | 
|---|---|
| <form> | enctype | 
Example
Example
Send form-data encoded as "multipart/form-data":
  
    <form action="/action_page_binary.asp"
 method="post" enctype="multipart/form-data">
  First name: <input type="text" name="fname"><br>
  Last name: <input type="text" name="lname"><br>
  <input type="submit" value="Submit">
 </form>
  
Try it Yourself »
Browser Support
| Attribute | |||||
|---|---|---|---|---|---|
| enctype | Yes | Yes | Yes | Yes | Yes | 

