English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML Reference Manual

HTML Tag Directory

HTML: <form> accept-charset Attribute

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).

 HTML <form> tag

Online Examples

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 ‹/›

Browser Compatibility

IEFirefoxOperaChromeSafari

All mainstream browsers support accept-charset Attribute

Definition and Usage

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).

HTML 4.01 with HTML5between the differences

In HTML 4.01In, the character encoding list can be separated by spaces or commas. In HTML5In, the list must be separated by spaces.

Syntax

<form accept-charset="character_set">

Attribute value

ValueDescription
character_setList of character encodings used when submitting a form, multiple character encodings are separated by spaces.

Common values:

  • UTF-8 - Unicode character encoding

  • ISO-8859-1 - Character encoding of the Latin alphabet

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.

 HTML <form> tag