Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML meta charset Attribute

HTML charset property

HTML meta Tag Reference HTML tag

Example

Specify the character encoding for the HTML document:

Try it »


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the charset property.


Definition and Usage

The charset attribute specifies the character encoding of the HTML document.

**Tip:** The charset attribute can be overridden by the lang attribute on any element.


Differences between HTML 4.01 and HTML5

The charset attribute is new in HTML5 and replaces:

It is still allowed to use the http-equiv attribute to specify the character set, but using the new method reduces the amount of code.


Syntax

HTML tag