HTML Attributes

HTML <form> accept-charset Attribute

The accept-charset attribute specifies the character encodings the server accepts for a submitted form.


The <form> accept-charset Attribute

The accept-charset attribute belongs to the <form> element. It declares the character encoding (or a space-separated list of encodings) the server will accept when the form data is submitted. By default, forms are submitted using the encoding of the page, so in modern practice this is almost always UTF-8.

Syntax

ℹ️

Syntax: <form accept-charset="charset-list">. The value is one encoding name, or several separated by spaces or commas.

Force UTF-8 encoding for a job-application form
<form action="/apply" method="post" accept-charset="UTF-8">
  <input type="text" name="name" placeholder="Your name">
  <button type="submit">Apply</button>
</form>
ValueDescription
UTF-8Universal Unicode encoding, the recommended default
ISO-8859-1Legacy Western European (Latin-1) encoding
UTF-1616-bit Unicode encoding, rarely used for forms
charset listMultiple encodings separated by spaces, e.g. "UTF-8 ISO-8859-1"
💡

In nearly all modern sites you should serve pages as UTF-8 (via <meta charset="UTF-8">) and leave accept-charset unset or set to UTF-8 to safely handle names in any language.

Ready to use your HTML skills?

Find web development internships and fresher jobs across India.

Browse Web Dev Internships