Article Navigation

Back To Main Page


 

Click Here for more articles

Google
XHTML - Kicking And Screaming Into The Future
by: Eric Lester
XHTML,standard, was first released back in twozerozerozero. Roughly five years later we begin to see major websites revised to use this standard. Evenfavorite whipping boy of standards-compliance punditry, Microsoft, presents their primary homepages, msn.com and microsoft.com in XHTML. Standards compliant XHTML sites are stillminority. The reason is simple. WhenWthreeC releasednew standard,rest ofweb running on HTML did not cease to function. Nor willrest ofweb, written in various flavors of HTML, cease to function any time soon. Without any pressing need to conform tonew standard, designers continue to use old, familiar methods. These methods will perform in any modern browser, so why bother switching?

These sentiments are similar to ones I experienced. A kind of "if it's not broke, do not fix it" mentality sets in. Whether HTML was "broken" or not isdifferent argument. Tocasual Internet user, their standards are fairly direct. Ifsite displays without noticeable error and functions to their satisfaction, these standards are met. Whatever additional stepsbrowser took to make such display possible is irrelevant to most users. This kind of mentality is difficult to overcome in designers accustomed to their old methods.

Technical obstacles to adopting XHTML may be quite steep as well, especially as regards large, existing websites with complex scripting. Yettime may eventually come where yesterday's "tried and true" HTML is little more thanancient language, unable to be interpreted by modern electronic devices. Whether one agrees withdirectionWthreeC takes indevelopment of HTML is irrelevant, you are just along forride. With some perseverance, gettinghang of XHTML is possible. In form, it is not as different from HTML as Japanese is from English. Knowing HTML grantsbasic knowledge oflanguage, it simply becomesmatter of learningparticular dialect. Evenoriginal nay-sayer such as myself managed to do it.

Benefits of XHTML
There are two primary benefits to using XHTML. First isstrict nature of valid XHTML documents. "Valid" documents contain no errors. Documents with no errors can be parsed more easily bybrowser. Thoughtime saved is, admittedly, negligible fromhuman user's point of view, there isgreater efficiency tobrowser's performance. Most modern browsers will function well in what's usually referred to as "quirks" mode, where, inabsence of any on-page information aboutkind of HTML they are reading, present"best guess" rendering ofpage. The quirks mode will also forgive many errors inHTML. Modern browsers installed on your home computer haveluxury of size and power to deal with these errors. When browser technology makesleap to other appliances it may not havesize and power to be so forgiving. This is wherestrict, valid documents demanded byXHTML standard become important.

The second benefit is incode itself, which is cleaner and more compact than common, "table" based layout in HTML. Though XHTML retains table functionality,standard makes clear tables are not to be used for page layout or anything other than displaying data intabular format. This is generallyprimary obstacle most designers have with moving to XHTML. The manner in which many designers have come to rely on to layout and organize their pages is now taboo. Simple visual inspection of XHTML code reveals how light and efficient it is in comparison totable based HTML layout. XTHML makes use of Cascading Style Sheets (CSS), which, when called externally, remove virtually all styling information fromXHTML document itself. This createsdocument focused solely on content.

XHTML makes use of "div" tags to define content areas. How these "divisions" are displayed is controlled by CSS. This is known as CSS-P, or CSS Positioning. Trading in "table" tags for "divs" can be tough. Learningnew way of accomplishingalready familiar task is generally difficult. Like learning to usedifferent design program or image editor, frustration can be constant. Looking at "divs" askind of table cell might be helpful, though they are not entirely equivalent. As required byXHTML standard, always make sure there isDOCTYPE definition attop ofdocument. This is not only required bystandard, but it will force Internet Explorer six, currentlymost common browser, to enter its "standards compliance" mode. IEsix and Firefox, both operating in standards compliance mode will display XHTML in muchsame way. Not identical, but far better than IEsix operating in quirks mode. Learning how to iron outfinal differences between displays isfinal obstacle and can requirebit of tweaking inCSS.

Clean code has multiple benefits. It createssmaller page size which, over time, can save costs associated with transfer usage. Thoughsize difference may appear small, for someone runninghighly trafficked site, even savingfew kilobytes of size can makebig difference. Further, some believe search engines may look more kindly on standards complaint pages. This is onlytheory, though. Ingeneral sense, any page modification that makescontent easier to reach and higher incode is considered wise. Search engines, so it is believed, prefer to reach content quickly, and give greater weight tofirst content they encounter. Using XHTML and "div" layout allows designers to accomplish this task more easily.

Conclusions
XHTML iscurrent standard set byWthreeC. The WthreeC continues development of XHTML, and XHTML two.zero will replacecurrent standard infuture. Learning and using XHTML today will help designers prepare for tomorrow. Valid XTHML produces no errors that might slow downbrowser, andcode produced is clean and efficient. This saves in file size and helps designers better accomplish their search engine optimization goals. Learning XHTML is primarily about learningnew way to lay out pages. Though frustrating at first,long term benefits far outweigh any initial inconvenience.

Aboutauthor:
Eric Lester worked inIT industry for five years, acquiring knowledge of hosting, website design, before serving for four years aswebmaster for Apollo Hosting, http://www.apollohosting.comApollo Hosting provides website hosting, ecommerce hosting, vps hosting, and web design services towide range of customers.


Circulated by Article Emporium

 



©twozerozerofive - All Rights Reserved