Associating Character Encoding and language Information with HTML, XHTML and CSS Files

Richard Ishida - W3C

Intended Audience: Site Coordinators, Testers, Web Administrators, Web Designers
Session Level: Beginner, Intermediate, Advanced

This short tutorial explains how to associate information about character encodings and natural language with XHTML, HTML and CSS pages.

It incorporates the latest thinking and developments from the W3C on these topics.

It also takes into account whether XHTML is served as text/html or XML, and the distinction between HTML/XHTML served in 'standards' vs 'quirks' mode. These approaches have an important bearing on the question. The result is a condensed is not always as straightforward as it may seem.

The tutorial assumes a basic familiarity with HTML, XHTML and CSS.