The formenctype attribute is used to show how the form data should be encoded when it is submitting to the server. It introduced in HTML5 and only used with input type submit an image.
Here are the formenctype attribute values −
|S.No||Value & Description|
This is the default. All the characters are encoded before sent.
None of the characters are encoded.
In this, the spaces are converted to + symbols. However, no special characters are encoded.
You can try to run the following code to learn how to use the formenctype attribute in HTML.
<!DOCTYPE html> <html> <head> <title>HTML formenctype attribute</title> </head> <body> <form action=”” method="post"> Name<input type="text" name="name"/><br> <input type="submit" formenctype="multipart/form-data" value="Submit"> </form> </body> </html>