The charset
attribute on a meta
tag specifies to the browser what character encoding to use for the page.
Browsers uses this information to properly render the web page.
A charset
attribute on a meta
element.
With this setting, the page will use UTF-8 character encoding.
<meta charset="UTF-8">
meta
= metadata
The charset
attribute specifies what character encoding the page uses.
Browsers need to know what character set to use to be able to properly render the HTML page.
Tip: On an HTML5 web page, with <!DOCTYPE html>, the charset defaults to UTF-8.
This is usually the desired setting making the meta charset setting unnecessary.
<meta charset="character-set">
Value | Description |
---|---|
ISO-8859-1 | The default character set for HTML4. Not case-sensitive. |
UTF-8 | The default character set for HTML5. Not case-sensitive. |
For additional details about Charsets see our HTML Charset Reference.
Here is when charset
support started for each browser:
Chrome
|
1.0 | Sep 2008 |
Firefox
|
1.0 | Sep 2002 |
IE/Edge
|
1.0 | Aug 1995 |
Opera
|
1.0 | Jan 2006 |
Safari
|
1.0 | Jan 2003 |
Back to <meta>