HTML accept-charset attribute

accept-charset attribute defines the character encoding that is used for the form submission.

Example

<form action="files/accept-charset.php" accept-charset="UTF-8" method="post">
  User Name: <input type="text" name="username"> <br>
  Phone No: <input type="tel" name="telnum"> <br>
  Message: <textarea name="message"></textarea> <br>
  <input type="submit" name="send" value="send">
 </form>
Try </>

accept-charset attribute values

The value of this attribute is the set of space separated tokens. These tokens are ASCII case-insensitive, consisting of labels of ASCII character encodings.

The following are the character encodings.

UTF-16BE, UTF-16LE,UTF-7,GSM03.38

Some are obsolete and some have limitations.

Related Tags

The tags that support accept-charset attribute are as follows.

<form> tag

The form element defines a form that collects data from the user.

See the example given above.



Was this article helpful?

 

Email:

Message:

Get the newsletter