The usefulness of a website being XHTML compliant

Countless webmasters stress over the issue of the need to be XHTML compliant, for both search engine optimisation as well as to decrease cross browser issues. In a way being XHTML compliant is like providing a guarantee to your users that the site they are visiting is top notch. However is there really a need to goto such extent to get your website XHTML compliant?

In more ways than one, I believe that newly built websites should be XHTML compliant to a certain extent. The reason I say this is because of the fact that being XHTML compliant almost guarantees that your website would look the same on all web browsers (maybe except Internet Explorer because Microsoft likes to be different). However, you will need to take into consideration the extra time needed to make your website compliant.

Sure you will get viewed properly on all browsers, heck you can even add the W3C XHTML 1.0 transitional button on your website just to make yourself feel better about spending those extra 5 hours making it compliant. But then there are times when you need to launch a site within a very short time frame, and your employer or client does not have the patients for make things compliant and most don’t even see the point behind it.

There has been debates about how a website being XHTML compliant can rank better on search engines and that it allows the crawlers to understand the text a lot more. In my opinion, that is complete bullocks, there have been no solid evidence to prove this and worse of all, the major search engines (Google and Yahoo) can’t even pass the XHTML 1.0 test. So how can the major search engines expect us to be XHTML compliant when even they failed to do so. Well, they basically can’t and they won’t.

With that being said, your html coding still does affect how crawlers craw your website. Not in the sense that your html needs to be compliant, but more on the side of how you formed your html and if there is alot of junk in there. The golden rule of thumb of html coding for search engine is “Less code more content“, which basically means that you should minimise html coding where possible so that your content is more prominent to crawlers.

Although search engine crawlers have grown a lot more advance compared to 5 years ago,  they are still not smart enough to decrypt everything that is within your html code. Hence it has become our job (in a sense) to make their life a lot easier by writing clean html and removing the unnecessary “ugly” coding which we often see back in the old days. By writing less html coding, we decrease the chances of mistakes which the crawlers could make whilst trying to understand our pages, this benefits both us and the search engines.

To make your life easier when coding your new website I have devised the following points as tips to guide you to a clean, easy to understand html page.

  • Place your javascript codes in a separate js file
  • Use CSS to style and format your page
  • Place the CSS styling codes in a separate .css file
  • Remove unnecessary breaks, paragraphs, fonts, and span tags (or any other tags)
  • Remember to close all open tags, this is a general html rule which a lot of web developers forget for unknown reasons
  • Start learning to use Divs instead of tables, mainly because its cleaner with less code and very scalable when it comes to style via CSS.

If you follow the above rules, the outcome of your html should be clean, readable, easy to understand and contains no javascript or styling. Doing the above is only one step of making your website XHTML compliant, but in my point of view, its more than enough. If you have anything to add to the above list leave a comment so that I can add your views to my post.

No comments yet.

Write a comment: