@charset
Summary
Specifies the character encoding of the style sheet.
Examples
Set the character encoding of the style sheet to Unicode UTF-8 (recommended)
@charset "UTF-8";
Set the character encoding of the style sheet to Cyrillic (Windows 1251)
@charset "Windows-1251";
Notes
Remarks
You can use only one @charset rule in an external style sheet. The rule must appear at the top of the file, cannot be preceded by any characters, and cannot be included in an embedded style sheet.
The rule has no default value.
Syntax
@charset CharSet-Description
Parameters
- CharSet-Description
- String that specifies the name of the character encoding.
Standards information
- CSS 2.1, Section 4.4
Related specifications
- Cascading Style Sheets Level 2 Revision 1 (CSS 2.1)
- Recommendation
See also
Related articles
Syntax
@charset
Attributions
Microsoft Developer Network: [Windows Internet Explorer API reference Article]