CSS @charset Rule

❮ Previous Reference Next ❯

Example

@charset "UTF-8";

Meaning

The @charset rule can be used in an external sheet to define character set encoding of the style rules and values.

Note: This rule should never be used in an embedded style sheet, as there are many other ways to indicate character sets with a <meta> tag or an HTTP header.

This at-rule is useful when using non-ASCII characters in some CSS properties, like content.




Standard Syntax

@charset: charset;



Browser Support

The numbers in the table specify the first browser version that fully supports the property.




Status







Property Values

The following table describes the values of this property.

Value Description
charset Specifies the character encoding to use.
❮ Previous Reference Next ❯