html tutorial - accept-charset Attribute in HTML - html5 - html code - html form

Accept charset attribute in html

Learn html - html tutorial - Accept charset attribute in html - html examples - html programs

  • The accept-charset attributes is used to specify the character encoding which is used for form submission.
  • By default, the reserved string value is “UNKNOWN”.
  • Which indicates that the encoding is equals to the encoding of the document containing<form> element.

Syntax for accept-charset attribute in HTML:

<form accept-charset=”character_set”>

Differences between HTML 4.01 and HTML5 for accept-charset attribute:

HTML 4.01

  • HTML4 does not support <details> element.


  • HTML5 support <details> element.

Applies To:

Element Attribute
<form> accept-charset

Values for accept-charset Attribute:

Value Description
  • A space-separated list of one or more character encodings that are to be used for theform submission.
  • Common values: UTF-8 - Character encoding for Unicode ISO-8859-1 - Character encoding for the Latin alphabet
  • Sample Coding for accept-charset Attribute in HTML:

    Tryit=""><!DOCTYPE html>
            <title>Wikitechy accept-charset attribute</title>
           <h2>HTML accept-charset attribute with example</h2>
                <form action="acceptcharset.html" accept-charset="ISO-8859-1" onsubmit="alert('Submitted!');return false;">
                    Mail-ID: <input type="text" name="mail">
                    Password:  <input type="text" name="pwd">
                    <input type="submit" value="Submit">

    Code Explanation for accept-charset Attribute in HTML:

    accept-charset Attribute Code Explanation

    1. The accept-charset attribute declared as a ISO-8859-1 which is latin.

    Output for accept-charset Attribute in HTML:

    accept-charset Attribute Tag Output

    1. “𐌄mail” input has a Latin character.
    2. accept-charset1 Attribute Tag Output
    3. When user submit the form then the submitted value displayed in the URL in Unicode. Because the accept-charset attribute value is “ISO-8859-1”.
    4. accept-charset2 Attribute Tag Output
    5. 3. If the accept-charset attribute is set to “UTF-8”. Then the output will be shown above.

    Browser Support for accept-charset Attribute in HTML:

    yes yes yes yes yes

    Related Searches to accept-charset Attribute in html

    Adblocker detected! Please consider reading this notice.

    We've detected that you are using AdBlock Plus or some other adblocking software which is preventing the page from fully loading.

    We don't have any banner, Flash, animation, obnoxious sound, or popup ad. We do not implement these annoying types of ads!

    We need money to operate the site, and almost all of it comes from our online advertising.

    Please add to your ad blocking whitelist or disable your adblocking software.