Horje

How to add HTML <form> enctype multipart/form-data Attribute

multipart/form-data  This value is necessary if the user will upload a file through the form
index.html
Example: HTML
<!DOCTYPE html>
<html>
<body>

<h1>The form enctype attribute</h1>

<form action="/action_page_binary.asp" method="post" enctype="multipart/form-data">
  <label for="fname">First name:</label>
  <input type="text" id="fname" name="fname"><br><br>
  <label for="lname">Last name:</label>
  <input type="text" id="lname" name="lname"><br><br>
  <input type="submit" value="Submit">
</form>

</body>
</html>

Output should be:

How to add HTML <form> enctype multipart/form-data Attribute




Type:
html
Category:
Web Tutorial
Sub Category:
HTML Tag
Uploaded by:
Admin