Wednesday, September 27, 2006

Fourth Tutorial -- Why XHTML?

Hi guys.Now begins our fourth tutorial of web standard. I guess you've seen through our previous newsletters, right? Yes, I'm glad you still remember. We've discussed about how we did in HTML in the early days, the deficiency of HTML and the birth of XML. Perhaps some of you might have already come up with a question: Since XML appears so great, why we still need to step into XHTML as an intermediate before getting to XML? Why don't we learn XML directly? That's the issue we are going to discuss.

So firstly, I would like to let you guess: how long did it take for me to learn XML? 1 or 2 years? No. It would take me at least 4 years to learn. The reason I use the word "would" here is that until now I can't say I know XML. I got touch with the idea in senior middle school, 17 years old. I tried to study its manual, but I cound't found any so called manual. Then I turned to some online forums, trying to find some hints about XML. However, I could barely understand a word. "I must be stupid", I thought. Later, I started to realize that I've adopted the wrong way at the first place. I treated XML as a new kind of markup language, and studied it as I studied HTML. Actually, rather than being a concrete language like HTML, XML is more likely to be described as a "standard". It has no tag pre-defined! You are entitled to use anything you want to use, and at the same time you have to define whatever you want to use. Knowing how to define a tag is definitely too much for any novice page builder, which makes XML extremely difficult to learn.

On the other hand, we can't throw away our current web which has been built with HTML for long. It's too huge, and many people are reluctant, too busy or unable to change. Moreover, many people still building websites in HTML. They are too accustomed to the old standard. Browsers also don't want to give up the existing market. Say all the browsers suddenly give up to support unstandard web pages one day, probably, most of the site will crash within several days. HTML, as a long used tool to build the web, still have its reason to exist.

In order to get rid of the deficiency of HTML while still keeping its convenience, scientist devices a "new" language too meet both sides, that is, XHTML. Generally speaking, XHTML is the HTML based on XML. Its page is actually written in XML, with all tags defined in HTML language. That's the trick. When we program in XHTML, we are getting accustomed to XML's standard, conventions, yet still keeping our pages easy to program and available to most of the browsers. To conclude, we may try jumping directly into the jam of XML, or we can choose to taste it bit by bit by learning XHTML.

Referrence: XHTML -- Example by Example

0 Comments:

Post a Comment

<< Home