W3Schools.com

HTML <form> accept-charset Attribute

HTML form Tag Reference HTML <form> tag

Example

Use of the accept-charset attribute in a form:

<form action="form_action.asp" 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>

Try it yourself »

Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The accept-charset attribute is supported by all major browsers.


Definition and Usage

The accept-charset attribute specifies the character-sets the server can handle for form-data.


Syntax

<form accept-charset="character_set">

Attribute Values

Value Description
character_set A space- or comma-separated list of one or more character encodings the server accepts.

Common values:

  • UTF-8 - Character encoding for Unicode
  • ISO-8859-1 - Character encoding for the Latin alphabet

In theory, any character encoding can be used, but no browser understands all of them. The more widely a character encoding is used, the better the chance that a browser will understand it.

To view all available character encodings, go to our Character sets reference.



HTML form Tag Reference HTML <form> tag
WEB HOSTING
Best Web Hosting
PHP MySQL Hosting
Best Hosting Coupons
UK Reseller Hosting
Cloud Hosting
Top Web Hosting
$3.98 Unlimited Hosting
Premium Website Design
WEB BUILDING
Download XML Editor
FREE Website BUILDER
Best Website Templates Top CSS Templates
CREATE HTML Websites
EASY WEBSITE BUILDER
W3SCHOOLS EXAMS
Get Certified in:
HTML, CSS, JavaScript, XML, PHP, and ASP
W3SCHOOLS BOOKS
New Books:
HTML, CSS
JavaScript, and Ajax
STATISTICS
Browser Statistics
Browser OS
Browser Display
SHARE THIS PAGE