Declaring a Style Sheet's EncodingBecause style sheets are mostly made up of CSS properties and enumerated values, they don't often contain anything but ASCII text. However, there's no reason why the classes, ids, or even content couldn't contain non-ASCII characters. Especially in those cases, it's important to declare the style sheet's encoding (and save it properly as well, as described on page 333). To declare a style sheet's encoding:On the very first line of your style sheet, type @charset "code";, where code is the name of the encoding with which you saved the style sheet. Tips
Figure 21.9. Because this style sheet includes id names with non-ASCII characters, you should declare its encoding in the very first line.
|