Web Hosting Talk







View Full Version : Why Use XHTML?


MCP
06-19-2004, 07:09 PM
This article is a good read for people who haven't yet switched to XHTML. I thought it would be helpful.

Why Use XHTML on Your Web Site? by Chris Hooley of MCP Media, Inc.

As web site owners, we all want the same thing. We all want a great design. We all want to make money. We all want our site to reach as many people as possible. But how often have you heard "My site looks great at home but I looked at it on this different computer and it looked like crap!"?

Chances are you've heard this before, or maybe you've even said it yourself. Thankfully, good web developers know how to avoid this, and still deliver everything you should expect from a good web site.

Many web design companies only understand certain portions of creating a great web presence. Some companies focus on web development, but have limited design and marketing skills. Others are so focused on bleeding edge technology and design that they forget that some people view websites on PDAs or alternative browsers that can't support such technical wizardry. Few firms can find that sweet spot in the middle where your web site looks great and functions well in all instances. Enter XHTML and cross browser compatibility.

What is XHTML?
XHTML is the W3C standard for developing cross browser compatible web sites. It fuses all of the display elements of HTML with some of the functionality of XML. By forcing a web designer to program more carefully and adhere to strict code standards, XHTML allows a larger percentage of browsers or code parsers to properly parse your documents. In less geeky terms, it means more people can see your site the way you meant for them to see it, and less people see your site with elements strewn all over their page.

For your site to reach the widest potential audience, it is important that it is developed in the most cross browser compatible method possible. XHTML is that method. The rise of handheld internet ready devices is forcing lazy web designers to program their sites more efficiently, since most internet ready cell phones and PDAs require XHTML to be able to view web sites properly. People who use mac computers often see a bunch of gibberish on their screen when browsing the web because some of the tools web design "professionals" use create bloated code that does not render properly. Lazy programmers often only use WYSIWIG (what you see is what you get) editors to create their web pages and don't even bother to open up the code window.

When somebody comes to your site and sees a total mess of graphics and tables all over the place, it is your brand and your site that suffers. No company looks good with a site that looks bad. Let's do a short exercise to prove this point.

Right now think of me as a user who is ready to buy a widget. You sell widgets. I just landed on your home page. Your site looks awesome on my computer at home running Internet Explorer. However, today I am browsing around on my neat new cell phone. Chances are if you're site is not XHTML compliant; it looks terrible to me right now. I don't want to see this mess on my new toy, so to clean my screen, I just click right past you and into your competitor's home page. Unfortunately for you, their site is programmed in XHTML and looks perfect.



That's it, I'm sold... and I just bought this shiny new widget from your competitor.


--------------------------------------------------------------------------

Chris Hooley (http://www.mcpmedia.com/corporate_info/chris-hooley.php) is a web design and web development (http://www.mcpmedia.com/) specialist and founder of MCP Media, Inc. MCP Media is a Phoenix Arizona based web design, web development, and internet business development firm.

Rich2k
06-19-2004, 07:16 PM
It's a shame that IE doesn't fully support XHTML with CSS properly then :)

MCP
06-19-2004, 07:28 PM
Actually, it is quite easy to develop an XHTML site that is 100% compatible with I.E. In fact, most sites designed for I.E. can be switched to XHTML by closing some open tags (like <br> to <br />), using proper case (<table> instead of <TABLE>), making sure your javscript is DOM compliant, and changing the doc type.

Which elements of XHTML and CSS are you aware of that I.E. is not properly supporting?

*note - Rich2k, your site is really really close to validating as XHTML (http://validator.w3.org/check?uri=http://www.dominion-web.com/) . Good job!

nzbm
06-19-2004, 11:51 PM
XHTML is very good. Don't forget to validate your pages!
http://validator.w3.org

Rich2k
06-20-2004, 08:38 AM
Originally posted by MCP
*note - Rich2k, your site is really really close to validating as XHTML (http://validator.w3.org/check?uri=http://www.dominion-web.com/) . Good job!

It was meant to, I just forgot to re-test it when I changed the design recently. The main page now does (I forgot three alt tags on spacers)

All the others have 1 missing alt tag :( which aren't in the template.

ACW
06-20-2004, 08:57 AM
Originally posted by nzbm
XHTML is very good. Don't forget to validate your pages!
http://validator.w3.org Thanks for the link.

Burhan
06-20-2004, 12:36 PM
Its WYSIWYG not WYSIWIG. You also forgot to mention about the annoying "quirks mode" -- which affects both Mozilla and IE.

In addition -- I really didn't feel that your writeup was very convincing -- atleast from a business standpoint. I am a developer that occasionally dabbles in design. I have always validated all projects that I am involved in -- be it XHTML or HTML -- however, its very difficult to convince someone that doesn't care about development or design -- to budget the time and effort it is required to ensure XHTML validity.

A very common question that is asked is -- "Yahoo, etc. don't validate -- and they aren't even XHTML ... so why should I bother with it?".

I understand all the benefits of XHTML, but its still difficult to convince someone why they should spend the time (and money) to have their site converted from HTML to XHTML.

Perhaps a better point would be to write semantically correct markup. This ensures that your code makes sense, even to those user agents that don't care for HTML/XHTML.

nexcess.net
06-20-2004, 02:18 PM
fyrestrtr, I agree that being convinced is not easy. Hell, I'm convinced but our new site still isn't 100% XHTML compliant given all the browser quirks. A good read (and a convincing read) on the subject is a book called "Designing with Web Standards" by Jeff Zeldman.

Here it is:

http://www.bookpool.com/.x/pptptz3nd0/sm/0735712018

Chris