HTML <meta> charset Attribute

The charset attribute on a meta tag specifies to the browser what character encoding to use for the page.

Example

#

A charset attribute on a meta element.
With this setting, the page will use UTF-8 character encoding.

<meta charset="UTF-8">
meta = metadata

Using charset

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.


Syntax

<meta charset="character-set">

Values

#

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.


Browser support

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

You may also like

 Back to <meta>
Guides