Tutorials References Menu

HTML <meta> charset Attribute

❮ HTML <meta> tag

Example

Specify the character encoding for the HTML document:

<head>
  <meta charset="UTF-8">
</head>
Try it Yourself »

Definition and Usage

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

The HTML5 specification encourages web developers to use the UTF-8 character set, which covers almost all of the characters and symbols in the world!


Browser Support

Attribute
charset Yes Yes Yes Yes Yes

Syntax

<meta charset="character_set">

Attribute Values

Value Description
character_set Specifies the character encoding for the HTML document. The HTML5 specification encourages web developers to use the UTF-8 character set!

❮ HTML <meta> tag