Electric Type

Multimedia

About Us

News

Help

XHTML Overview

Page 6 — Defining Languages

Unicode will likely become the future standard for character sets on the Web. A truly world-wide character set like Unicode seems to be the only choice for the World Wide Web. Until then, if you have an editor that can save text files using the UTF-8 character set, then by all means use UTF-8. This is extremely helpful when writing in different languages. The whole concept of languages on the Web certainly opens a big can of worms that I'm only going to lightly touch upon in this article.

Though not required by the XHTML 1.0 specification, you should define the primary language of your document in the root <html> tag. The "lang=" argument we all know and love is being phased out for XML's "xml:lang=". So, the interim XHTML 1.0 solution is use both:

       <html xml:lang="en" lang="en">...</html>

The above example is what you would use if the main language of your entire document is English. Use the <span> tag to specify the language of a word or phrase:

       <p>That <span lang="it" xml:lang="it">ragù</span> has a
       <span lang="fr" xml:lang="fr">je ne sais quoi</span>.</p>

In this case, "it" stands for Italian and "fr" is for French. The ISO 639 specification boasts and impressive list of language codes. Go ahead, write a page in Telugu or Yoruba, I dare you. The more languages per Web page, the better. Help make the World Wide Web truly world wide.

next page»


Dynamic HTML  

Frames  

HTML Basics  

Stylesheets  

Tables  

XML  

Javascript  

Database Connections  

Intro To Perl  

HTML 4.0  

User Blogs

Screen Shots

Latest Updates

Contact Us

Valid HTML 4.01!
Valid CSS!

Breadcrumb

© ElectricType
Maintained by My-Hosts.com
Site map | Copyright | Disclaimer
Privacy policy | Acceptable Use Policy
Legal information.