Copyright © 2003 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C liability, trademark, document use and software licensingrules apply.
This document is an editors' copy that has no official standing.
This is a very early working draft. It is undergoing constant and frequent modification.
This document is published as part of the W3C Internationalization Activity by the Internationalization Working Group, with the help of the Internationalization Interest Group. The Internationalization Working Group will not allow early implementation to constrain its ability to make changes to this specification prior to final release. Publication as a Working Draft does not imply endorsement by the W3C Membership. It is inappropriate to use W3C Working Drafts as reference material or to cite them as other than "work in progress". A list of current W3C Recommendations and other technical documents can be found at http://www.w3.org/TR/.
1 Document structure & metadata
2 Language variants
3 Fonts & line height
4 Text direction
5 Lists
6 Tables
7 International aspects of CSS styling
8 Ruby
This section will contain topics such as:
Always use an @charset declaration as the first thing in an external stylesheet file.
To set the character encoding you may use the @charset "at-rule". Its syntax is:
@charset "<IANA defined charset name>";
A CSS stylesheet can quite easily contain non-ASCII characters. For example, CSS selectors may reference element names, attribute names, or attribute values that are in another language than English. Also, values for such CSS properties as content, quote, or font-family may include non-ASCII characters in many parts of the world.
For style declarations embedded in a document, @charset rules are not needed and must not be used. These rules are for use in linked style sheets.
Only one @charset rule may appear in an external style sheet and it must appear at the very start of the document. It must not be preceded by any characters, not even comments.
The name must be a charset name as described in the IANA registry. (See also the complete list of charsets). For example to label your CSS file as UTF-8 encoded you would write:
@charset "UTF-8";
source | FAQ: CSS character encoding declarations |
GEO FAQ, How do I declare the character encoding inside a CSS (Cascading Style Sheets) style sheet? |