HTML accept-charset Attribute

HTML accept-charset Attribute specifies the character encoding that should be used for the submission of the form data. If character encoding is not defined then the document encoding will be used for the form data as well.

Syntax of HTML accept-charset Attribute

The Syntax of HTML accept-charset Attribute is shown below.

<form accept-charset="character_set">
</form>

Usage of HTML accept-charset Attribute

HTML accept-charset Attribute is used to define the character encoding type for the form data. HTML accept-charset Attribute is used inside the form tag.

Used For

HTML accept-charset Attribute is used for following tags.

Tag Name
HTML form Tag

Example of HTML accept-charset Attribute

Simple example of HTML accept-charset Attribute is given below.

<form accept-charset = "UTF-8">
</form>

In above example we have used UTF-8 character encoding for the form data.

Values of HTML accept-charset Attribute

Common values used with HTML accept-charset Attribute are.

ValueDescription
UTF-8Character Encoding for Unicode.
ISO-8859-1Character Encoding for the Latin alphabet.

Browser Support for HTML accept-charset Attribute

HTML accept-charset Attribute is supported by following major browsers.

Browser NameVersion
ChromeAll
FirefoxAll
OperaAll
IE / EdgeAll
SafariAll