Declaring Character Set in CSS File

By Xah Lee. Date: . Last updated: .

By default, CSS file is assumed to be UTF-8 encoded, unless the server or other mechanism says otherwise.

However, you can declare it in your CSS file, by putting the following in the first line:

@charset "UTF-8";

For a introduction on Unicode, see: Unicode Basics: What's Character Set, Character Encoding, UTF-8?


Syntax and basic data types#charset

[Declaring character encodings in CSS By W3C. At , Accessed on 2013-06-16 ]

Liket it? Put $5 at patreon.

Or, Buy JavaScript in Depth

Ask me question on patreon