HTML <form> accept-charset Attribute
Definition and Usage
accept-charset
Attribute specifies the character encoding to be used when submitting the form.
Example
Form with accept-charset attribute:
<form action="/action_page.php" accept-charset="utf-8"> <label for="fname">Name:</label> <input type="text" id="fname" name="fname"><br><br> <input type="submit" value="Submit"> </form>
Syntax
<form accept-charset="character_set">
Attribute Value
Value | Description |
---|---|
character_set |
A space-separated list of character encodings, used for one or more character encodings when submitting a form. Common Values:
In theory, any character encoding can be used, but no browser can understand all encodings. The more widely a character encoding is used, the better the browser's support for it. To view all available character encodings, please refer to our character set reference. |
Browser Support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | Support | Support | Support | Support |