CSS Tip: Character Encoding

Posted in CSS Tips
Tags: , ,

The first line of your CSS file should have:

The @charset CSS at-rule specifies the character encoding used in the style sheet.

Some say it is not important anymore because  a browser user agent can easily deduce the character encoding, but I have seen on rare occasions where omitting it has produced unsupported issues on  CSS properties on older browsers (i.e. :before).

So better safe, than sorry. 

Reference: http://www.w3.org/International/questions/qa-css-charset.en.php

Leave a Reply

Your email address will not be published. Required fields are marked *