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
Syntax
<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).
Value
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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Example of HTML accept-charset attribute with form </title>
</head>
<body>
<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" />
</form>
</body>
</html>
Result
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.
It will be nice if you may share this link in any developer community or anywhere else, from where other developers may find this content. Thanks.
https://w3resource.com/html/attributes/html-accept-charset-attribute.php
- Weekly Trends and Language Statistics
- Weekly Trends and Language Statistics