HTML <meta> charset attribute
Definition and Usage
charset
The attribute specifies the character encoding used in the HTML document.
The HTML5 specification encourages web developers to use the UTF-8 character set, which covers almost all characters and symbols in the world!
UTF-8 encoding can represent all Unicode characters with the fewest number of bytes, so it is very widely used.
Example
Specify the character encoding of the HTML document:
<head> <meta charset="UTF-8"> </head>
Syntax
<meta charset="character_set">
Attribute Value
Value | Description |
---|---|
character_set |
Specify the character encoding of the HTML document. The HTML5 specification encourages web developers to use the UTF-8 character set! |
Browser Support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | Support | Support | Support | Support |