Easy Tutorial
❮ Canvas Arcto Tag Tfoot ❯

HTML <meta> charset Attribute

HTML <meta> Tag

Example

Specify the character encoding for the HTML document:


Browser Support

All major browsers support the charset attribute.


Definition and Usage

The charset attribute specifies the character encoding for 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: <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

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


Syntax

Attribute Values

Value Description
character_set Specifies the character encoding for the HTML document. Common values: UTF-8 - Unicode character encoding<br> ISO-8859-1 - Character encoding for the Latin alphabet. Theoretically, any character encoding can be used, but not all browsers can understand them. The more widely a character encoding is used, the more likely it is that a browser will understand it. For a list of all available character encodings, visit IANA Character Sets

❮ Canvas Arcto Tag Tfoot ❯