HTML | <meta> charset Attribute
The HTML charset Attribute is used to specify the character encoding for the HTML document. The charset attribute could be overridden by using the lang attribute of any element.
Syntax:
<meta charset="character_set">
Attribute Values: It contaisn the value i.e character_set which specify the character encoding for the HTML document.
Values:
- UTF-8: It specify the character encoding for Unicode.
- ISO-8859-1: It specify the character encoding for the Latin alphabet.
Example: This Example illustrates the use of charset Attribute in Meta Element.
<!DOCTYPE html> <html> <head> <title> HTML charset Attribute </title> <meta name="keywords" charset="UTF-8" content="Meta Tags, Metadata" /> </head> <body style="text-align:center"> <H1>Hello GeeksforGeeks!</H1> <h2> HTML charset Attribute in Meta Element </h2> </body> </html> |
Output:

Supported Browsers: The browser supported by HTML <meta> Charset Attribute are listed below:
- Google Chrome
- Internet Explorer
- Firefox
- Opera
- Safari
Recommended Posts:
- HTML | charset Attribute
- HTML | <a> charset Attribute
- HTML | <link> charset Attribute
- HTML | accept-charset Attribute
- HTML | <script> charset Attribute
- HTML | <form> accept-charset Attribute
- HTML | DOM Script charset Property
- HTML | <img> src Attribute
- HTML | name Attribute
- HTML | <li> value Attribute
- HTML | <bdo> dir Attribute
- HTML src attribute
- HTML | dir Attribute
- HTML | <a> rel Attribute
- HTML | rel attribute
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.



