HTML accept-charset attribute

accept charset

The purpose of the HTML accept-charset attribute is to specify the supported character sets for a form.

Supported elements

HTML accept-charset attribute supports form


<form accept-charset="value" >.....</form> 

Type of value

Type of value of HTML accept-charset attribute is a valid character set (for example ISO-8859-1).


A string representing a valid character set.

Default value

There is no default value of HTML accept-charset attribute.

Supported doctypes

HTML 4.01 strict, HTML 4.01 transitional, HTML 4.01 frameset.

Example of HTML accept-charset attribute with form

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Example of HTML accept-charset attribute with form </title>
<form action="action.php" accept-charset="ISO-8859-1">
Email id : <input type="text" name="email" /><br />
Password : <input type="text" name="passw" /><br />
<input type="submit" value="Submit" />


html accept charset attribute with form

View this example in a separate browser window

Example of HTML accept-charset attribute with form

Previous: HTML abbr attribute
Next: HTML accept attribute

Test your Programming skills with w3resource's quiz.

Follow us on Facebook and Twitter for latest update.