Usage of CSS @charset rule

CSSWeb DevelopmentFront End Technology

If you are writing your document using a character set other than ASCII or ISO-8859-1 you might want to set the @charset rule at the top of your stylesheet to indicate what character set the style sheet is written in.

The @charset rule must be written right at the beginning of the style sheet without even space before it. The value is held in quotes and should be one of the standard character-sets.

Example

Let us see an example

<style>
   <!--
      @charset "iso-8859-1"
      .......other CSS rules .....
   -->
</style>
raja
Published on 27-Apr-2018 17:09:32
Advertisements