form accept-charset Attribute - HTML CSS HTML Tag

HTML CSS examples for HTML Tag:form

Description

The accept-charset attribute sets the character encodings to be used for the form submission.

The default value is the reserved string "UNKNOWN".

Attribute Values

Value Description
character_set A space-separated list of one or more character encodings for the form submission.

Common values:

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

A form with an accept-charset attribute:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<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><!-- w  w  w  .j a  v  a  2  s . co  m-->

</body>
</html>

Related Tutorials