You are here: Reference > CSS > at-rules > charset

@charset rule

Browser support:
Specifies the character set encoding of an external style sheet.
Only one @charset rule can be used in an external style sheet, and it must be the first statement in the style file.
In Javascript, the cssRules collection contains the CSS rules of a stylesheet, and the CSSCharsetRule object represents a @charset rule. The cssRules collection is supported in Internet Explorer from version 9, but it does not contain the @charset rules. There is no way to access to a @charset rule in Internet Explorer.


@charset "[encoding]";
encoding - Specifies the character set.


@charset "ISO-8859-1";
Did you find this example helpful? yes no

External links:

User Contributed Comments

Post Content

Post Content