Skip to content
Related Articles

Related Articles

HTML | <form> accept-charset Attribute

View Discussion
Improve Article
Save Article
Like Article
  • Difficulty Level : Basic
  • Last Updated : 24 Oct, 2020

The HTML <form> accept-charset Attribute is used to define the character encoding and is used for form submission. The default value of the accept-charset attribute is “UNKNOWN” string which indicates the encoding equals to the encoding of the document containing the <form> element.


<form accept-charset = "character_set">

Attribute Value: The attribute value contains the list separated value of one or more encoding attributes. The common value of encoding attributes is UTF-8, ISO-8859-1. This attribute always associated with the form element only.


<!DOCTYPE html>
      HTML form accept-charset attribute
        h1 {
            color: green;
        body {
            text-align: center;
      HTML <form> accept-charset Attribute
    <form action="#" accept-charset="UTF-8">
        First name:
        <input type="text" name="fname">
        <br> Last name:
        <input type="text" name="lname">
        <input type="submit" value="Submit">


Supported Browsers: The browsers supported by HTML <form> accept-charset Attribute are listed below:

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Apple Safari
  • Opera

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!