Hosting Solutions
mobile_logo Table of Contents
seal_frontseal_back

charset

The CSS @charset declaration specifies the character encoding for an external style sheet. It should only be applied in cases where the calling document and the external style sheet must have different character encodings. It should be placed on the first line of the style sheet with no whitespace before it. It should not be placed in a <style> element in the document itself, nor in the style attribute of any html elements in the document.

Code Example

Specify the CSS document as utf-8 encoded which helps render unicode characters properly if you have that need. @charset "utf-8"; Specify Korean character encoding. @charset "euc-kr"; Specify Chinese Traditional character encoding. @charset "big5";

Learn more about encoding and the encoding types you can choose to apply to documents.

Official Documentation

http://www.w3.org/TR/css-syntax-3/#at-ruledef-charset

CSS

At Rules

charsetcounter styledocumentfont facefont feature valuesimportkeyframesmedianamespacesupports