- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
HTML accept-charset Attribute
The accept-charset attribute in HTML is used to set the character encodings for the form.
Following is the syntax−
<form accept-charset="char_set">
Above, char_set is a list of one or more character encodings. This list has space-separated encodings. It can be for Unicode (UTF-8) as well as Latin alphabet (ISO-8859-1).
Let us now see an example to implement the accept-charset attribute−
Example
<!DOCTYPE html> <html> <body> <h2>Result</h2> <form action="" accept-charset="ISO-8859-1"> <label for="stinfo">Student:</label> <input type="text" id ="stinfo"><br> <label for="sub">Subject:</label> <input type="text"><br> <label for="rank">Rank:</label> <input type="number"><br> <label for="marks">Marks:</label> <input type="number"><br><br> <input type="submit"> </form> </body> </html>
Output
Advertisements