English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
form accept-The charset attribute specifies the character encoding used for form submission. The default value is the reserved string "UNKNOWN" (indicating that the encoding is equal to the encoding of the document containing the <form> element).
With accept-Form charset Attribute:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>HTML <form> accept-charset Attribute Usage-Basic Tutorial(oldtoolbag.com)</title> </head> <body> <form action="action_page.php" accept-charset="ISO-8859-1"> First name: <input type="text" name="fname"><br> Last name: <input type="text" name="lname"><br> <input type="submit" value="Submit"> </form> </body> </html>Test and see ‹/›
IEFirefoxOperaChromeSafari
All mainstream browsers support accept-charset Attribute
accept-The charset attribute specifies the character encoding used for form submission.
The default value is the reserved string 'UNKNOWN' (indicating that the encoding is equal to the encoding of the document containing the <form> element).
In HTML 4.01In, the character encoding list can be separated by spaces or commas. In HTML5In, the list must be separated by spaces.
<form accept-charset="character_set">
Value | Description |
---|---|
character_set | List of character encodings used when submitting a form, multiple character encodings are separated by spaces. 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 supports it. To view all available character encodings, please visit our Character Encoding Reference Manual. |