HTML | <form> enctype Attribute
The HTML <form> enctype Attribute is used to specify that data that will be present in form should be encoded when submitting to the server. This type of attribute can be used only if method = “POST”.
Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML course.
Attribute Value: This attribute contains three value which are listed below:
- application/x-www-form-urlencoded: It is the default value. It encodes all the characters before sent to the server. It converts spaces into + symbols and special character into its hex value.
- multipart/form-data: This value does not encode any character.
- text/plain: This value convert spaces into + symbols but special characters are not converted.
Example: This Example illustrates the use of enctype attribute in <form> element.
Supported Browsers: The browsers supported by <form> enctype Attribute are listed below:
- Google Chrome
- Internet Explorer
- Apple Safari