HTML enctype attribute
The enctype attribute defines the type of content that is used to store and transmit the data of form.
<p> If simple text is submitted, then enctype is html. </p> <form action="files/enctype.php" method="post" enctype="text/html"> Email: <input type="email" name="email"> <br> Password: <input type="password" name="password"> <br> <input type="submit" name="login" value="login"> <br> </form></>
If simple text is submitted, then enctype is html.
Attribute valuesAll possible values of enctype attribute
enctype attribute is an enumerated attribute that has more than one values.
It indicates that the only plain text is sent.
This is the default attribute. In this method non-ASCII characters can not be sent. Form is encoded as follows.
space characters are converted to '+'
alphanumeric characters are converted to '%HH' (percent with two hexadecimal digits)
line breaks are converted to '%0D%0A'.
multipart attribute is used when the data includes files, data (Non-ASCII) and binary data. It should be used to send large quantity of data.
Related TagsThe tags that support enctype attribute
The form element supports the enctype attribute. The form collects the data from the user.
Was this article helpful?